public Connector(Control source, Connected target, VisualDirection direction, HAlign horizAlign, VAlign vertAlign, ConnectorKind kind, VisualStyle style) : base(source, horizAlign, vertAlign) { Target = target; Kind = kind; ConnectorStyle = style; }
public VisualStyle(VisualStyle parent = null, Font font = null, Brush textBrush = null, Pen pen = null, Brush brush = null) { _parent = parent ?? Default; _font = font; _textBrush = textBrush; _pen = pen; _brush = brush; }
public static void UpdateBitmap(this Visual visual, Bitmap bitmap, VisualStyle style) { var gfx = Graphics.FromImage(bitmap); gfx.Clear(Color.Transparent); gfx.SmoothingMode = SmoothingMode.AntiAlias; gfx.TextRenderingHint = TextRenderingHint.AntiAlias; var ctx = new GraphicsContext(gfx, style); visual.Render(ctx, new VBox(bitmap.Size)); }
public static Bitmap ToBitmap(this Visual visual, Size size, PixelFormat pixelFormat, VisualStyle style) { var result = new Bitmap (size.Width, size.Height, pixelFormat); var gfx = Graphics.FromImage (result); gfx.SmoothingMode = SmoothingMode.AntiAlias; gfx.TextRenderingHint = TextRenderingHint.AntiAlias; var ctx = new GraphicsContext (gfx, style); visual.Render (ctx, new VBox (size)); return result; }
public static Bitmap ToBitmap(this Visual visual, Size size, PixelFormat pixelFormat, VisualStyle style) { var result = new Bitmap(size.Width, size.Height, pixelFormat); var gfx = Graphics.FromImage(result); gfx.SmoothingMode = SmoothingMode.AntiAlias; gfx.TextRenderingHint = TextRenderingHint.AntiAlias; var ctx = new GraphicsContext(gfx, style); visual.Render(ctx, new VBox(size)); return(result); }
private VisualStyle GetStyle(VisualStyle parent) { return(new VisualStyle(parent, Style._font, Style._textBrush, Style._pen, Style._brush)); }
public static Visual Styled(Visual visual, VisualStyle style) { return new _Styled (visual, style); }
public static Visual Styled(Visual visual, VisualStyle style) { return(new _Styled(visual, style)); }
public _Styled(Visual visual, VisualStyle style) : base(visual) { Style = style; }
public GraphicsContext(Graphics gr, VisualStyle style) { Graphics = gr; Style = style; }
public GraphicsContext(GraphicsContext gc, VisualStyle style) : this(gc.Graphics, style) { }
public static void UpdateBitmap(this Visual visual, Bitmap bitmap, VisualStyle style) { var gfx = Graphics.FromImage (bitmap); gfx.Clear (Color.Transparent); gfx.SmoothingMode = SmoothingMode.AntiAlias; gfx.TextRenderingHint = TextRenderingHint.AntiAlias; var ctx = new GraphicsContext (gfx, style); visual.Render (ctx, new VBox (bitmap.Size)); }
private VisualStyle GetStyle(VisualStyle parent) { return new VisualStyle (parent, Style._font, Style._textBrush, Style._pen, Style._brush); }