Overview
Basic shapes provide the foundation for creating tree diagrams with simple geometric forms. These shapes inherit fromTCustomTreeShape and TTreeNodeShape base classes.
Inheritance Hierarchy
Common Base Classes
TTreeNodeShape
The fundamental base class for all node shapes in TeeTree. Key Properties:Style: Determines the shape appearance (rectangle, circle, diamond, etc.)Text: Text content displayed in the shapeFont: Font properties for text displayBorder: Pen properties for shape borderBrush: Fill properties for shape interiorShadow: Optional shadow effectGradient: Gradient fill optionsAutoSize: Automatically adjust size to fit contentTransparent: Make shape background transparent
Draw(): Renders the shapeClicked(x, y): Checks if coordinates are within shape boundsAddChild(text): Adds a child nodeAddConnection(shape): Creates connection to another shape
TCustomTreeShape
Base class for custom geometric shapes, derived fromTTreeNodeShape.
Rectangle Shapes
Standard Rectangle
TTreeNodeShape with tssRectangle
The most basic rectangular shape.
Round Rectangle
Round Rectangle
Rectangle with rounded corners.
RoundSize: Controls the radius of corner rounding (default: 3)
Chamfered Rectangle
Chamfer
Rectangle with beveled corners.
Circle and Ellipse
Circle
Circular or elliptical shape.
Diamond Shape
Diamond
Diamond/rhombus shape, commonly used for decision points.
Triangle Shapes
Triangle Top
Triangle pointing upward
Triangle Bottom
Triangle pointing downward
Triangle Left
Triangle pointing left
Triangle Right
Triangle pointing right
Line Shapes
Vertical Line
Vertical Line
Simple vertical line shape.
Horizontal Line
Horizontal Line
Simple horizontal line shape.
Diagonal Lines
Line
Diagonal line from top-left to bottom-right
Inverted Line
Diagonal line from top-right to bottom-left
Custom Shapes
Custom Shape
Use custom drawing for complete control over shape appearance.
Complete Example
Here’s a comprehensive example creating a tree with various basic shapes:Style Constants
All availableTTreeShapeStyle values:
| Constant | Description |
|---|---|
tssRectangle | Standard rectangle |
tssCircle | Circle or ellipse |
tssVertLine | Vertical line |
tssHorizLine | Horizontal line |
tssLine | Diagonal line (top-left to bottom-right) |
tssInvertLine | Inverted diagonal line |
tssDiamond | Diamond/rhombus |
tssTriangleTop | Upward-pointing triangle |
tssTriangleBottom | Downward-pointing triangle |
tssTriangleLeft | Left-pointing triangle |
tssTriangleRight | Right-pointing triangle |
tssRoundRectangle | Rectangle with rounded corners |
tssChamfer | Rectangle with beveled corners |
tssCustom | Custom shape (override drawing) |
See Also
Flowchart Shapes
Specialized shapes for flowcharts and process diagrams
UML Shapes
Shapes for UML diagrams
Electric Shapes
Shapes for circuit and electronic diagrams
Custom Shapes
Create your own custom shapes
