Exemplo n.º 1
0
        public DrawPad()
        {
            InitializeComponent();

            Zoom = 1;

            _shapeDrawer = new ShapeDrawer();
            _filler = new Filler();
            _drawingControl = new DrawingControl();
            _drawingControl.SetShapDrawer(_shapeDrawer);
            _drawingControl.ShapeCreated += DrawingControl_ShapeCreated;

            _textControl = new TextControl(gdiArea);
            _textControl.TextCreated += TextControl_TextCreated;
            _textControl.TextChanged += TextControl_TextChanged;

            _currentCommand = DrawPadCommand.None;
            _currentShape = null;

            _outlineWidth = 2F;
            _outlineColor = Color.Black;
            _outlineDash = DashStyle.Solid;
            _fillColor = Color.Transparent;
            _textFont = new Font("Segoe UI", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0);

            _shapeArea = 0;
        }
Exemplo n.º 2
0
        public ImageCache(Viewport viewport, ShapeDrawer shapeDrawer, Filler filler, Page page, int width, int height)
        {
            _viewport = viewport;
            _shapeDrawer = shapeDrawer;
            _filler = filler;
            _page = page;

            _page.ImageBuffer = new Bitmap(width, height);
            using (var graph = Graphics.FromImage(_page.ImageBuffer))
            {
                graph.Clear(Color.White);
            }

            _page.AddedShape += Page_AddedShape;
        }
Exemplo n.º 3
0
        public ImageCache(Viewport viewport, ShapeDrawer shapeDrawer, Filler filler, Page page, int width, int height)
        {
            _viewport    = viewport;
            _shapeDrawer = shapeDrawer;
            _filler      = filler;
            _page        = page;

            _page.ImageBuffer = new Bitmap(width, height);
            using (var graph = Graphics.FromImage(_page.ImageBuffer))
            {
                graph.Clear(Color.White);
            }

            _page.AddedShape += Page_AddedShape;
        }
Exemplo n.º 4
0
 public ShapeDrawer()
 {
     _filler = new Filler();
 }
Exemplo n.º 5
0
 public ShapeDrawer()
 {
     _filler = new Filler();
 }