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