public MouseTrippleHandler(PanelDrawing _Host)
        {
            host      = _Host;
            penCustom = host.penCustom;

            drawLayer = null;
            grabPoint = null;

            pointTranslate = Point.Empty;
        }
Beispiel #2
0
        public void GetImage(Image _Image, PanelDrawing _Host)
        {
            if (image != null)
            {
                image.Dispose();
            }
            image = new Bitmap(_Image);

            //Graphics hostGraphic = _Host.CreateGraphics();

            // WARNING!!! Không có cái này: với các máy có DPI bình thường sẽ không sao hết
            // với các máy sử dụng scaled DPI sẽ gặp rắc rối rất lớn
            //  (vd: hình load vào nhỏ hơn khung, brush bị lệch toạ độ)
            //((Bitmap)(image)).SetResolution(hostGraphic.DpiX, hostGraphic.DpiY);
            //hostGraphic.Dispose();

            width = image.Width;
            heigh = image.Height;
        }
Beispiel #3
0
        public MyPen(PanelDrawing _Host)
        {
            host = _Host;

            colorBack = Color.Transparent;

            // brushes - - - - - -
            brushFront = new SolidBrush(Color.Black);

            //brush = brushFront;

            // brush linear được sinh ra trong lúc vẽ.
            //brushLinear = new LinearGradientBrush(Point.Empty, Point.Empty, Color.Black, Color.Black);


            // brush texture được sinh ra trong lúc chọn texture
            brushTexture = new TextureBrush(host.BackgroundImage);

            brushHatch = new HatchBrush(HatchStyle.BackwardDiagonal, Color.Black);
        }
Beispiel #4
0
 public Mouse_Rectangle(PanelDrawing _Host) : base(_Host)
 {
 }
Beispiel #5
0
 public Mouse_Region(PanelDrawing _Host) : base(_Host)
 {
 }
Beispiel #6
0
 public Mouse_Line(PanelDrawing _Host) : base(_Host)
 {
 }
Beispiel #7
0
 public Mouse_Polygon(PanelDrawing _Host) : base(_Host)
 {
     pointController = host.controlPoint;
 }
Beispiel #8
0
 public Mouse_Dot(PanelDrawing _Host) : base(_Host)
 {
 }
Beispiel #9
0
 public Mouse_Eclipse(PanelDrawing _Host) : base(_Host)
 {
 }