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