Geometry & Transform 17 entries
position, size and rotation of shapes
Entries in this section
- shape.Left / .Top / .Right / .BottomEdge coordinates. Top > Bottom because Y points up. Children inside a group don't expose t
- shape.PositionX / .PositionYBottom-left corner. Reading and writing these directly is one call cheaper than SetPositio
- shape.SizeWidth / .SizeHeightWidth and height, read/write. When scaling, read the current size first, then compute the
- shape.CenterX / .CenterYCenter coordinates. More convenient than Left/Top when you're aligning things.
- shape.RotationAngleRotation in degrees, around RotationCenterX/Y.
- shape.SetPosition(x, y, anchor)The default anchor is bottom-left; the third argument picks a different one. img.SetPositi
- shape.SetSize(w, h, anchor)Scales; the default anchor is top-left. Proportional scaling is on you: s = max(W/ow, H/oh
- shape.Move(dx, dy)Relative offset. Cheaper than SetPosition because it doesn't read the current position fir
- shape.Rotate(angle)Rotates by a relative angle.
- shape.GetBoundingBox()Returns (x, y, w, h). The only way to read the position of text inside a container — objec
- shape.Type1 rectangle / 2 ellipse / 3 curve / 5 bitmap / 6 text / 7 group. After converting to curve
- shape.StaticIDStable ID. Use it to deduplicate when the same object arrives down more than one path. You
- shape.NameObject name, read/write. Name the important elements ("title bar", "image frame") and late
- shape.Clone()Clones in place — the copy sits exactly on top of the original.
- shape.Duplicate(dx, dy)Copies with an offset; dx and dy are the offset.
- shape.Delete()Deletes. The object is gone afterwards; reading any property on it raises.
- shape.AddToSelection() / .RemoveFromSelection()Add to or drop from the selection. Build up a batch this way, then process it in one pass.
Getting StartedConnection & InitApplicationDocumentPageLayer & ShapesGeometry & TransformGroup / Order / BooleanShape AppearanceTextTextRangeFillOutlinePowerClipFountain FillPattern / Texture FillTransparency & BlendEffectsColorCurve & NodeBitmapFind & TraverseUnits & ConversionImport / ExportEnumerationsObject DataAlign / DistributeLayer AdvancedView & PerformanceEventsRecipesPitfalls