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); }
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()); }
public void Clear() { pen = null; pen2 = null; brush = null; imageStyle = null; textStyle = null; extStyle = null; }