// ------------------------------------------------- Relocate public void Relocate (Point ptAnch, TextBasis basicpoint, double ang_Deg) { basis = basicpoint; pts = Auxi_Geometry .TextGeometry_Degree (sizef, ang_Deg, ptAnch, basis); angle = Auxi_Common .LimitedRadian (Auxi_Convert .DegreeToRadian (ang_Deg)); DefineCover (); }
// ------------------------------------------------- MoveNode public override bool MoveNode (int i, int dx, int dy, Point ptMouse, MouseButtons catcher) { bool bRet = false; if (catcher == MouseButtons .Left) { if (i < pts .Length) { basis = (TextBasis) i; } Move (dx, dy); bRet = true; } else if (catcher == MouseButtons .Right && i != (int) basis) // i == pts .Length { double angleMouse = -Math .Atan2 (ptMouse .Y - AnchorPoint .Y, ptMouse .X - AnchorPoint .X); Angle = angleMouse - compensation; bRet = true; } return (bRet); }
// ------------------------------------------------- public SpottedText (Form form, Point ptAnch, TextBasis basicpoint, string txt, Font fnt, double ang_Deg, Color clr) { id = Auxi_Common .UniqueID; formParent = form; text = CheckedText (txt); sizef = Auxi_Geometry .MeasureString (form, text, fnt); basis = basicpoint; pts = Auxi_Geometry .TextGeometry_Degree (sizef, ang_Deg, ptAnch, basis); font = fnt; angle = Auxi_Common .LimitedRadian (Auxi_Convert .DegreeToRadian (ang_Deg)); clrText = clr; clrNodes = Color .Violet; clrBasicNode = Color .Red; clrFrame = Color .Violet; penFrame = new Pen (clrFrame); penFrame .DashStyle = DashStyle .Dash; bShowSpots = true; }