Exemple #1
0
 public CanvasWrapper(UCCanvas ucCanvas, Graphics graphics, Rectangle rectangle)
 {
     this.UCCanvas        = ucCanvas;
     this.Graphics        = graphics;
     this.ClientRectangle = rectangle;
 }
Exemple #2
0
 private void MouseMoveSetBridge(MouseEventArgs e)
 {
     if (!this.bridgeStart.IsEmpty)
     {
         UnitPoint mousePoint     = this.GetMousePoint();
         Rectangle invalidaterect = ScreenUtils.ConvertRectangle(ScreenUtils.ToScreenNormalized(this.canvasWrapper, ScreenUtils.GetRectangleF(this.bridgeStart, this.bridgeEnd, UCCanvas.GetThresholdWidth() / 2)));
         invalidaterect.Inflate(2, 2);
         RepaintStatic(invalidaterect);
         this.bridgeEnd = mousePoint;
         CanvasWrapper canvasWrapper = new CanvasWrapper(this, Graphics.FromHwnd(this.Handle), this.ClientRectangle);
         Pen           pen           = new Pen(Color.Bisque, 1)
         {
             DashStyle   = DashStyle.Custom,
             DashPattern = new float[2] {
                 2, 3
             }
         };
         canvasWrapper.DrawLine(canvasWrapper, pen, this.bridgeStart, this.bridgeEnd);
         canvasWrapper.Graphics.Dispose();
         canvasWrapper.Dispose();
     }
 }
Exemple #3
0
 public CanvasWrapper(UCCanvas ucCanvas)
 {
     this.UCCanvas        = ucCanvas;
     this.Graphics        = null;
     this.ClientRectangle = new Rectangle();
 }