PolygonSymbolizer with Image

Jan 2, 2015 at 1:18 PM
Edited Jan 2, 2015 at 1:25 PM

Can You please send me the code to displaying the image as a pattern(like tiled) in side a polygon .

when i am using the following code its working fine

PolygonSymbolizer ps = new PolygonSymbolizer(System.Drawing.Color.White, System.Drawing.Color.Black, 30, GradientType.Rectangular, System.Drawing.Color.Black, 6);

the moment i am changing the code as follows
PolygonSymbolizer ps = new PolygonSymbolizer(newImage, WrapMode.Tile, 90);

its throwing error : " object reference is not set to an instance of object".