/// <summary> /// Add a new anchor element to attach an arrow start or end point to in the MessageArrowStack. /// </summary> /// <returns> The new UIElement that was added to the MessageArrowStack</returns> public ArrowAnchor AddArrowAnchorElement(int width, int height) { // A UIElement to attach a messsage arrow to. var arrowAnchorElement = new ArrowAnchor(width, height); // Add the arrowAnchor to the MessageArrow StackPanel Children.Add(arrowAnchorElement); return(arrowAnchorElement); }
internal override PointF getAnchoredPt(ArrowAnchor anchor) { if (row == -1) { return(table.getAnchor(anchor)); } if (anchor == ArrowAnchor.LeftCenter || anchor == ArrowAnchor.TopCenter) { relativePosition.X = 0; } else { relativePosition.X = 100; } relativePosition.Y = 50; return(getEndPoint()); }
internal PointF getAnchor(ArrowAnchor anchor, bool useRotation) { PointF center = getCenter(); PointF intrs = center; // find intersection with node outline float width = Math.Abs(rect.Width); float height = Math.Abs(rect.Height); switch(anchor) { case ArrowAnchor.LeftCenter: intrs.X -= width + 10; break; case ArrowAnchor.TopCenter: intrs.Y -= height + 10; break; case ArrowAnchor.RightCenter: intrs.X += width + 10; break; case ArrowAnchor.BottomCenter: intrs.Y += height + 10; break; } if (rotation() != 0 && useRotation) intrs = Utilities.rotatePointAt(intrs, center, rotation()); return getIntersection(intrs, center); }
internal PointF getAnchor(ArrowAnchor anchor) { return getAnchor(anchor, true); }
public virtual void loadFrom(BinaryReader reader, PersistContext ctx) { backColor = ctx.loadColor(); behavior = (BehaviorType)reader.ReadInt32(); arrowHead = (ArrowHead)reader.ReadInt32(); arrowBase = (ArrowHead)reader.ReadInt32(); arrowInterm = (ArrowHead)reader.ReadInt32(); arrowHeadSize = (float)reader.ReadDouble(); arrowBaseSize = (float)reader.ReadDouble(); arrowIntermSize = (float)reader.ReadDouble(); shadowsStyle = (ShadowsStyle)reader.ReadInt32(); boxFillColor = ctx.loadColor(); arrowFillColor = ctx.loadColor(); boxFrameColor = ctx.loadColor(); arrowColor = ctx.loadColor(); alignToGrid = reader.ReadBoolean(); showGrid = reader.ReadBoolean(); gridColor = ctx.loadColor(); gridSize = (float)reader.ReadDouble(); boxStyle = (BoxStyle)reader.ReadInt32(); shadowColor = ctx.loadColor(); imagePos = (ImageAlign)reader.ReadInt32(); textColor = ctx.loadColor(); activeMnpColor = ctx.loadColor(); selMnpColor = ctx.loadColor(); disabledMnpColor = ctx.loadColor(); arrowStyle = (ArrowStyle)reader.ReadInt32(); arrowSegments = reader.ReadInt16(); scrollX = (float)reader.ReadDouble(); scrollY = (float)reader.ReadDouble(); // zoomFactor was a short, now it is a float if (ctx.FileVersion < 19) zoomFactor = reader.ReadInt16(); else zoomFactor = reader.ReadSingle(); penDashStyle = (DashStyle)reader.ReadInt32(); penWidth = (float)reader.ReadDouble(); int c = reader.ReadInt32(); defPolyShape = reader.ReadBytes(c); docExtents = ctx.loadRectF(); shadowOffsetX = (float)reader.ReadDouble(); shadowOffsetY = (float)reader.ReadDouble(); tableFillColor = ctx.loadColor(); tableFrameColor = ctx.loadColor(); tableRowsCount = reader.ReadInt32(); tableColumnsCount = reader.ReadInt32(); tableColWidth = (float)reader.ReadDouble(); tableRowHeight = (float)reader.ReadDouble(); tableCaptionHeight = (float)reader.ReadDouble(); tableCaption = reader.ReadString(); arrowCascadeOrientation = (Orientation)reader.ReadInt32(); tableCellBorders = (CellFrameStyle)reader.ReadInt32(); boxIncmAnchor = (ArrowAnchor)reader.ReadInt32(); boxOutgAnchor = (ArrowAnchor)reader.ReadInt32(); boxesExpandable = reader.ReadBoolean(); tablesScrollable = reader.ReadBoolean(); }
internal abstract PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation);
internal void adjustEnds(ArrowAnchor orgnAnchor, ArrowAnchor destAnchor) { points[0] = orgnLink.getAnchoredPt(orgnAnchor, false); points[points.Count-1] = destLink.getAnchoredPt(destAnchor, false); orgnLink.saveEndRelative(); destLink.saveEndRelative(); updateArrowHeads(); }
internal abstract PointF getAnchoredPt(ArrowAnchor anchor);
internal override PointF getAnchoredPt(ArrowAnchor anchor) { return host.getAnchor(anchor); }
internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation) { return(point); }
internal override PointF getAnchoredPt(ArrowAnchor anchor) { return(point); }
internal override PointF getAnchoredPt(ArrowAnchor anchor) { if (row == -1) return table.getAnchor(anchor); if (anchor == ArrowAnchor.LeftCenter || anchor == ArrowAnchor.TopCenter) relativePosition.X = 0; else relativePosition.X = 100; relativePosition.Y = 50; return getEndPoint(); }
internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation) { return point; }
internal override PointF getAnchoredPt(ArrowAnchor anchor) { return point; }
internal override PointF getAnchoredPt(ArrowAnchor anchor) { return(host.getAnchor(anchor)); }
internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation) { return(host.getAnchor(anchor, useRotation)); }
internal override PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation) { return host.getAnchor(anchor, useRotation); }
internal abstract PointF getAnchoredPt(ArrowAnchor anchor, bool useRotation);
internal abstract PointF getAnchoredPt(ArrowAnchor anchor);