Ejemplo n.º 1
0
 public void UpdateFocusScales()
 {
     TheShape.FocalPoints.FocusScales = new PointF(Convert.ToSingle(tbarFocalX.Value / 1000), Convert.ToSingle(tbarFocalY.Value / 1000));
     TheShape.Invalidate();
     lblFx.Text = TheShape.FocalPoints.FocusScales.X.ToString();
     lblFy.Text = TheShape.FocalPoints.FocusScales.Y.ToString();
 }
 private void tbarAll_Scroll(System.Object sender, System.EventArgs e)
 {
     tbarUpperLeft.Value         = tbarAll.Value;
     tbarUpperRight.Value        = tbarAll.Value;
     tbarLowerLeft.Value         = tbarAll.Value;
     tbarLowerRight.Value        = tbarAll.Value;
     TheShape.Corners.UpperLeft  = Convert.ToInt16(tbarAll.Value);
     TheShape.Corners.UpperRight = Convert.ToInt16(tbarAll.Value);
     TheShape.Corners.LowerLeft  = Convert.ToInt16(tbarAll.Value);
     TheShape.Corners.LowerRight = Convert.ToInt16(tbarAll.Value);
     TheShape.Invalidate();
 }
Ejemplo n.º 3
0
 private void TheShape_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         TheShape.FocalPoints.CenterPoint = new PointF(Convert.ToSingle(e.X / TheShape.Width), Convert.ToSingle(e.Y / TheShape.Height));
     }
     else if (e.Button == System.Windows.Forms.MouseButtons.Right)
     {
         TheShape.FocalPoints.CenterPoint = new PointF(0.5F, 0.5F);
     }
     TheShape.Invalidate();
     UpdateCenterLabels(TheShape.FocalPoints.CenterPoint.X, TheShape.FocalPoints.CenterPoint.Y);
 }
 private void tbarLowerRight_Scroll(System.Object sender, System.EventArgs e)
 {
     TheShape.Corners.LowerRight = Convert.ToInt16(tbarLowerRight.Value);
     TheShape.Invalidate();
 }
 private void tbarUpperLeft_Scroll(System.Object sender, System.EventArgs e)
 {
     TheShape.Corners.UpperLeft = Convert.ToInt16(tbarUpperLeft.Value);
     TheShape.Invalidate();
 }