# BasePrimitive

**BasePrimitive** is a [VisualElement](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/visualelement) descendant that implements the **IPrimitive** interface. **IPrimitive** adds a single boolean property **ShouldPaint** and a **PaintPrimitive** method that draws a primitive to the screen. Descendants **of BasePrimitive** override the **PaintPrimitive** method to represent some atomic visual component like text, fill, checkbox, arrows, etc. The following code is a sample **PaintPrimitive** method implementation for the **TextPrimitive** class:

 

 

```C#
            
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
{
    Rectangle rect = this.BoundingRectangle;
	graphics.DrawString(this.Text, rect, this.Font, this.ForeColor, this.CreateStringFormat(), this.TextOrientation, this.FlipText);
}

```

```VB.NET
Public Overrides Sub PaintPrimitive(graphics As IGraphics, angle As Single, scale As SizeF)
    Dim rect As Rectangle = Me.BoundingRectangle
    graphics.DrawString(Me.Text, rect, Me.Font, Me.ForeColor, Me.CreateStringFormat(), Me.TextOrientation, Me.FlipText)
End Sub

```

 

## See Also

* [Choosing an Ancestor Class](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/choosing-an-ancestor-class)

* [Class Hierarchy Overview](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/class-hierarchy-overview)

* [LayoutPanel](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/layoutpanel)

* [RadComponent, RadComponentElement](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/radcomponent-radcomponentelement)

* [RadControl](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/radcontrol)

* [RadElement](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/radelement)

* [RadItem](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/raditem)

* [RadObject](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/class-hierarchy/radobject)
