예제 #1
0
        TextureBrush GetTextureBrush(ImageStyle imageStyle)
        {
            TextureBrush tb = null;

            if (imageStyle.attr == null)
            {
                tb = new TextureBrush(imageStyle.image);
            }
            else
            {
                Rectangle r = new Rectangle(0, 0, imageStyle.image.Width, imageStyle.image.Height);
                tb = new TextureBrush(imageStyle.image, r, imageStyle.attr);
            }
            return(tb);
        }
예제 #2
0
 public Brush GetBrush()
 {
     if (sbImage.Count > 0)
     {
         ImageStyle imageStyle = sbImage.GetImageStyle();
         if (imageStyle != null)
         {
             return(GetTextureBrush(imageStyle));
         }
     }
     if (Count == 0)
     {
         return(null);
     }
     if (HasKey("hs"))
     {
         return(GetHatchBrush());
     }
     return(GetSolidBrush());
 }
예제 #3
0
 public void Clear()
 {
     pen = null; pen2 = null; brush = null; imageStyle = null; textStyle = null; extStyle = null;
 }