CustomPath¶
Qualified name: delphifmx.CustomPath
- class CustomPath¶
Bases:
ShapeTCustomPath is the base class for all 2D path-type shapes representing groups of connected curves and lines. TCustomPath renders the path Data graphics with the Paint method. Paint scales and positions the path graphics according to the WrapMode parameter. Paint draws the path contour and fills the background using the drawing pen and brush with the properties, color, and opacity defined by the Stroke and Fill properties of the TCustomPath object.
Methods
TControl.AbsoluteToLocal() Converts the screen coordinates of a specified point on the screen to client coordinates.
TControl.BringToFront() Puts the control in front of all other controls in its parent control.
TControl.CanFocus() Indicates whether a control can receive focus.
TControl.LocalToAbsolute() Translates a given point from client area coordinates to global screen coordinates.
TCustomPath.PointInObject(X: float, Y: float) -> bool Checks whether the specified point belongs to the path Data of the TCustomPath object.
TControl.PrepareForPaint() Prepares the current control for painting.
TControl.Repaint() Forces the control to repaint its image on the screen.
TControl.ResetFocus() Removes the focus from a control of from any children of the control.
TControl.SendToBack() Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.
TControl.SetBounds(Left, Top, Width, Height) Sets the Left, Top, Width, and Height properties all at once.
TControl.SetFocus() Gives the input focus to the control.
Attributes
AbsoluteClipRectSpecifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabledSpecifies whether the control is absolutely enabled.
AbsoluteHeightSpecifies the absolute height of the control.
AbsoluteMatrixSpecifies the absolute transformation matrix of the control.
AbsoluteOpacitySpecifies the absolute opacity of the control.
AbsoluteRectSpecifies the absolute rectangle that bounds the control.
AbsoluteScaleSpecifies the absolute scale of the control.
AbsoluteWidthSpecifies the absolute width of the control.
ActionClientSpecifies whether the component object has an associated action.
AlignSpecifies the alignment options (top, left, client, and so on) of this control.
AnchorsSpecifies how the control is anchored to its parent.
ApplyingEffectA flag that signals when a control is in the process of applying an effect.
AutoCaptureSpecifies whether the control captures mouse events.
AxisAlignedRectA TRectF defined by the width and height of the control.
BoundsRectSpecifies the bounding rectangle of the control.
CanParentFocusSpecifies whether the parent of this control should be evaluated to receive focus.
CanvasProvides the drawing surface of the control.
ChildrenStores an array of children attached to this parent component.
ChildrenCountRead-only property that specifies the number of children in the children list.
ChildrenRectSpecifies the bigger rectangle area occupied by parent and children controls.
ClassNameReturns the TObject.ClassName
ClipChildrenSpecifies if children of the control should be clipped to the control's on-screen region.
ClipParentSpecifies whether the current control has clipped its parent.
ClipRectSpecifies the bound rectangle to be clipped.
ComObjectSpecifies the interface reference implemented by the component.
ComponentCountReturns the owned component count
ComponentIndexIndicates the position of the component in its owner's Components property array.
ComponentStateDescribes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyleGoverns the behavior of the component.
ComponentsReturns an iterator over the owned components
Returns an iterator over contained controls
Returns the count of contained controls
CursorImage to use to represent the mouse pointer when it passes into the region covered by the control.
Specifies the SVG data used to build graphic shapes.
DefaultSizeEmbarcadero Technologies does not currently have any additional information.
DesignInfoContains information used by the Form designer.
DisableDisappearEmbarcadero Technologies does not currently have any additional information.
DisableFocusEffectSpecifies whether the control has the focus effect disabled.
DragModeSpecifies how the control initiates drag-and-drop operations.
EnableDragHighlightSpecifies whether the control is highlighted when the dragged object is over it.
EnabledSpecifies whether the control responds to mouse, keyboard, and timer events.
FillDetermines the color and pattern used to fill the shape background.
FixedSizeEmbarcadero Technologies does not currently have any additional information.
HasAfterPaintEffectSpecifies whether the control has an effect that is applied after the control is painted.
HasClipParentControl that is a direct child of this control and has clipped this control.
HasDisablePaintEffectSpecifies whether the control's effect is painted.
HasEffectSpecifies whether the control has an applied effect.
HeightHeight specifies the vertical size of the control (in dp).
HintSpecifies the text string that appears when the user moves the mouse over a control.
HitTestEnables the control to capture mouse events.
InPaintToSpecifies whether the control is currently being painted.
IndexSpecifies the index of the child object in the children array attached to this object.
InheritedCursorImage used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrixSpecifies the inverse matrix of AbsoluteMatrix.
IsDragOverSpecifies whether a dragged object is over the area of the current control.
Determines whether the control has input focus.
IsInflatedWhether the current style of this control has been actually applied to the control.
IsMouseOverSpecifies whether the mouse cursor is over the control.
IsVisibleSpecifies whether the control is visible.
LocalRectSpecifies the local rectangle for painting the control.
LockedSpecifies whether the control is locked at design time.
MarginsAligns the component to the margins points of other components.
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OnGestureCallable[[Object, GestureEventInfo, bool], None]:
OpacitySpecifies the control opacity.
OwnerReturns the Component Owner
PaddingAligns the component to the padding points of other components.
ParentReturns/Sets the Control Visibility
ParentControlSpecifies the parent control of this control.
ParentedRectSpecifies the bounding rectangle of the control within its parent.
ParentedVisibleSpecifies whether all the control's parents are visible.
PopupMenuSpecifies the context (pop-up) menu object.
Returns an access to the position of the control inside its parent
PressedIndicates whether the control is currently pressed.
PressedPositionA point that indicates where exactly on the control the click occured.
RootSpecifies the root parent of this object.
SceneSpecifies the current scene in which the control is drawn.
ShapeRectSpecifies the rectangle for drawing the shape.
ShowHintSpecifies whether the Hint can be shown.
SizeSpecifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
StoredSpecifies whether this object is stored in the .XFM file.
StrokeDetermines the color and pattern of the drawing pen used to draw lines and shape contours of the graphical primitives.
StyleNameSpecifies the style name for this FMX component.
TabOrderIndicates the position of the control in its parent's tab order.
TabStopEmbarcadero Technologies does not currently have any additional information.
TagStores a NativeInt integral value as a part of a component.
TagFloatCustom property that stores any floating-point value.
TagObjectCustom property that stores any object value.
TagStringCustom property that stores any string value.
TouchSpecifies the touch manager component associated with the control.
TouchTargetExpansionSet of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
UpdateRectSpecifies the rectangle area of the control that needs to be updated.
VCLComObjectRepresents information used internally by components that support COM.
Returns/Sets the Control Visibility
WidthSpecifies the horizontal size of the control (in pixels).
Specifies whether and how to resize, replicate, and position the graphical path representation for painting the area.
- AbsoluteToLocal()¶
Converts the screen coordinates of a specified point on the screen to client coordinates.
- BringToFront()¶
Puts the control in front of all other controls in its parent control.
- CanFocus()¶
Indicates whether a control can receive focus.
- Controls¶
Returns an iterator over contained controls
- ControlsCount¶
Returns the count of contained controls
- Data¶
Specifies the SVG data used to build graphic shapes. The Data property supports only a comma-separated list of instructions defined for the d attribute of the path element in SVG 1.0. In SVG 1.0, the d attribute contains the moveto, line, curve, arc, and closepath instructions. All instructions are expressed as one character (for example, a moveto is expressed as an M). For more information, see Scalable Vector Graphics (SVG) 1.0 Specification.
Example To clarify, consider the following code snippets that specify the SVG instructions at run time:
Delphi:
Path1.Data.Data := ‘M 1,0, L 2,1, L 1,2, L 0,1, L 1,0’;
C++Builder:
Path1->Data->Data = “M 1,0, L 2,1, L 1,2, L 0,1, L 1,0”;
An application that uses the above mentioned SVG instructions displays a rhomb:
- Type:
PathData
- IsFocused¶
Determines whether the control has input focus.
- LocalToAbsolute()¶
Translates a given point from client area coordinates to global screen coordinates.
- PointInObject(X: float, Y: float) bool¶
Checks whether the specified point belongs to the path Data of the TCustomPath object. PointInObject calls the FMX.Graphics.TCanvas.PtInPath method of the TCanvas object to check whether the specified point belongs to the path Data of the TCustomPath object. X and Y are absolute pixel coordinates of the point to be checked:
X is the x-coordinate. Y is the y-coordinate.
- Position¶
Returns an access to the position of the control inside its parent
- PrepareForPaint()¶
Prepares the current control for painting.
- Repaint()¶
Forces the control to repaint its image on the screen.
- ResetFocus()¶
Removes the focus from a control of from any children of the control.
- SendToBack()¶
Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.
- SetBounds(Left, Top, Width, Height)¶
Sets the Left, Top, Width, and Height properties all at once.
- SetFocus()¶
Gives the input focus to the control.
- Visible¶
Returns/Sets the Control Visibility
- WrapMode¶
Specifies whether and how to resize, replicate, and position the graphical path representation for painting the area. The WrapMode property should be one of the constants defined in the TPathWrapMode type:
Stretch–stretches the path representation to fill the entire area. Default. Original–keeps the original path size. Fit–resizes the path representation (keeping proportions) to best fit the area. Tile–renders the path representation repeatedly to tile the area.
- Type:
PathWrapMode