Class DrawingUtils
Contains static methods related to drawing.
public static class DrawingUtils
- Inheritance
-
DrawingUtils
Fields
- SpaceCharsUsedToSplit
Gets or sets space characters used to split strings when they are word wrapped.
Methods
- DebugImageFromTextWithFontStyle(TextAndFontStyle[])
Creates debug image from the specified array of TextAndFontStyle.
- DistanceIsLess(PointD, PointD, float)
Compares distance between two points and specified value.
- DrawBorder(Graphics, ref DrawBorderParams)
Draws a border around the specified rectangular area using the provided parameters.
- DrawBorder(AbstractControl?, Graphics, RectD, BorderSettings?)
Draws border in the specified rectangle of the drawing context.
- DrawBorderWithBrush(Graphics, Brush, RectD, Thickness)
Draws rectangle border using the specified brush and FillRectangle(Brush, RectD). This method doesn't fill background, it only draws border.
- DrawBorderWithBrush(Graphics, Brush, RectD, float)
Draws rectangle border using the specified brush and FillRectangle(Brush, RectD). This method doesn't fill background, it only draws border.
- DrawBordersWithBrush(Graphics, Brush, RectD[], Thickness[]?)
Draws rectangles border using FillRectangle(Brush, RectD).
- DrawDebugTextAtCorner(Graphics, string, RectD)
Draws the specified text at the bottom-left corner of the given bounds, with a highlighted background and border.
- DrawDotLine(Graphics, float, float, float, float, Color, Color, int)
Draws a dotted line on the specified graphics context, alternating between two colors.
- DrawDoubleBorder(Graphics, RectD, Color, Color)
Draws inner and outer border with the specified colors.
- DrawHorzLine(Graphics, Brush, PointD, float, float)
Draws horizontal line using FillRectangle(Brush, RectD).
- DrawOnLinuxCairoSurface(Control, Action<SKCanvas>)
Renders content on a Linux Cairo surface for the specified control using the provided drawing action. This method is intended to be used in the paint event of a control to perform custom SkiaSharp rendering.
- DrawPushButton(Graphics, AbstractControl, RectD, VisualControlState)
Draws a push button control within the specified bounds and visual state.
- DrawPushButton(object?, PaintEventArgs, VisualControlState)
Draw push button using the specified parameters.
- DrawPushButtonDisabled(object?, PaintEventArgs)
Draw push button in the Disabled state using the specified parameters.
- DrawPushButtonFocused(object?, PaintEventArgs)
Draw push button in the Focused state using the specified parameters.
- DrawPushButtonHovered(object?, PaintEventArgs)
Draw push button in the Hovered state using the specified parameters.
- DrawPushButtonNormal(object?, PaintEventArgs)
Draw push button in the Normal state using the specified parameters.
- DrawPushButtonPressed(object?, PaintEventArgs)
Draw push button in the Pressed state using the specified parameters.
- DrawRadioButton(Graphics, AbstractControl, RectD, bool, VisualControlState)
Draws a radio button control within the specified bounds, reflecting its checked state and visual appearance.
- DrawRoundRectangleLTRB(Graphics, Pen, float, float, float, float, float, float)
Draws a rounded rectangle on the specified graphics surface using the given dimensions and corner radii.
- DrawVertLine(Graphics, Brush, PointD, float, float)
Draws vertical line using FillRectangle(Brush, RectD).
- FillBorderRectangle(Graphics, RectD, Brush?, BorderSettings?, bool, AbstractControl?)
Fills rectangle background and draws its border using the specified border settings.
- FillBorderRectangle(Graphics, ref DrawBorderParams)
Fills a rectangle with a specified brush and optionally draws a border around it.
- FillRoundRectangleLTRB(Graphics, Brush, float, float, float, float, float, float)
Fills a rounded rectangle defined by its left, top, right, and bottom coordinates.
- GetBottomLineRect(RectD, float)
Gets rectangle of the bottom border edge with the specified width.
- GetCenterLineHorz(RectD)
Gets rectangle of the horizontal center line of the rectangle.
- GetCenterLineVert(RectD)
Gets rectangle of the vertical center line of the rectangle.
- GetCheckBoxSize(AbstractControl, CheckState, VisualControlState)
Gets default checkbox size.
- GetCornerRadius(ref DrawBorderParams)
Calculates the uniform corner radius for a given border configuration.
- GetDistance(PointD, PointD)
Calculates distance between two points.
- GetDistanceSquared(PointD, PointD)
Gets squared distance between two points.
- GetLeftLineRect(RectD, float)
Gets rectangle of the left border edge with the specified width.
- GetPointOnCircle(PointD, float, float)
Gets point on circle.
- GetPointsForDrawWave(RectI)
Generates an array of points representing a wave pattern within the specified rectangular area.
- GetRightLineRect(RectD, float)
Gets rectangle of the right border edge with the specified width.
- GetTopLineRect(RectD, float)
Gets rectangle of the top border edge with the specified width.
- ImageFromAction(float, Func<Graphics, SizeD>, Action<Graphics>?)
Creates Image with the size specified by
sizeAndDrawFuncand with pixels filled withdrawAction(orsizeAndDrawFuncif it is null).
- ImageFromTextWithBoldTag(string, float, Font, Color, Color?)
Creates image from the specified text with html bold tags.
- ImageFromTextWithFontStyle(TextAndFontStyle[], float, Font, Color, Color?)
Creates image from the specified array of TextAndFontStyle.
- IsPointInCircle(PointD, PointD, float)
Gets whether point is inside the circle.
- MeasureText(IEnumerable, Font, Graphics, float)
Calculates total size of the text strings.
- SetDebugBackgroundToParents(AbstractControl?)
Sets background of the control's parents to Red, Green, Blue and Yellow colors.
- WrapTextLineToList(string, float, Font, Graphics, StringSplitOptions)
Performs word wrapping of the single text line which doesn't contain new line characters.
- WrapTextToList(string, float, Font, Graphics)
Performs word wrapping of the multiple text lines which can contain new line characters.
- WrapTextToMultipleLines(string, float, Font, Graphics)
Performs word wrapping of the text.