Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 private VisualStyle GetStyle(VisualStyle parent)
 {
     return(new VisualStyle(parent, Style._font, Style._textBrush, Style._pen, Style._brush));
 }
Exemplo n.º 8
0
 public static Visual Styled(Visual visual, VisualStyle style)
 {
     return new _Styled (visual, style);
 }
Exemplo n.º 9
0
 public static Visual Styled(Visual visual, VisualStyle style)
 {
     return(new _Styled(visual, style));
 }
Exemplo n.º 10
0
 public _Styled(Visual visual, VisualStyle style) : base(visual)
 {
     Style = style;
 }
Exemplo n.º 11
0
 public GraphicsContext(Graphics gr, VisualStyle style)
 {
     Graphics = gr;
     Style = style;
 }
Exemplo n.º 12
0
 public GraphicsContext(GraphicsContext gc, VisualStyle style)
     : this(gc.Graphics, style)
 {
 }
Exemplo n.º 13
0
 public GraphicsContext(Graphics gr, VisualStyle style)
 {
     Graphics = gr;
     Style    = style;
 }
Exemplo n.º 14
0
 public GraphicsContext(GraphicsContext gc, VisualStyle style) :
     this(gc.Graphics, style)
 {
 }
Exemplo n.º 15
0
 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));
 }
Exemplo n.º 16
0
 private VisualStyle GetStyle(VisualStyle parent)
 {
     return new VisualStyle (parent, Style._font, Style._textBrush, Style._pen, Style._brush);
 }
Exemplo n.º 17
0
 public _Styled(Visual visual, VisualStyle style)
     : base(visual)
 {
     Style = style;
 }