Skip to main content
Box

PageCanvas.DrawEllipse(RichEditPenBase, Rectangle) Method

Draws a custom ellipse.

Namespace: DevExpress.XtraRichEdit.API.Layout

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

public void DrawEllipse(
    RichEditPenBase pen,
    Rectangle bounds
)

Parameters

Name Type Description
pen RichEditPenBase

RichEditPenBase descendant that sets the outline color and thickness.

bounds Rectangle

Sets the shape’s location and size.

Remarks

To set the line style, use the RichEditPenBase.DashStyle method.

Example

This code snippet illustrates the implementation of the PageCanvas.DrawImage and PageCanvas.FillEllipse methods. They draw a filled color ellipse and a custom image over the table cell.

View Example

Public Overrides Sub DrawTableCell(ByVal tableCell As LayoutTableCell)
    If Form1.customDrawTable = True Then
        Dim Tbounds As Rectangle = tableCell.Bounds
        Dim tableRectangle As New Rectangle(New Point(Tbounds.X + Tbounds.Width \ 2 - 10, Tbounds.Y + Tbounds.Height \ 2 - 10), New Size(20, 20))
        Canvas.FillEllipse(New RichEditBrush(Color.MediumAquamarine), Canvas.ConvertToDrawingLayoutUnits(tableRectangle, DocumentLayoutUnit.Pixel))
        Canvas.DrawImage(OfficeImage.CreateImage(DevExpress.Images.ImageResourceCache.Default.GetImage("devav/people/employeeaward_16x16.png")), tableCell.Bounds, ImageSizeMode.Squeeze)
        MyBase.DrawTableCell(tableCell)
    Else
        MyBase.DrawTableCell(tableCell)
    End If
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DrawEllipse(RichEditPenBase, Rectangle) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also