Skybound Rebar

ControlRenderer.DrawArrow Method 

Draws a triangle-style arrow at the specified location, using the given brush, size and angle.

[Visual Basic]
Public Shared Sub DrawArrow( _
   ByVal g As Graphics, _
   ByVal brush As Brush, _
   ByVal location As Point, _
   ByVal size As Integer, _
   ByVal angle As Integer _
)
[C#]
public static void DrawArrow(
   Graphics g,
   Brush brush,
   Point location,
   int size,
   int angle
);

Parameters

g
The Graphics surface to draw.
brush
The brush used to fill the arrow.
location
The top-left corner of the arrow.
size
The width of the longest edge of the arrow. Standard sizes are 7 for menu items and scrollbars, 3 for toolbar button drop-down arrows, or 5 for combo box drop-down arrows.
angle
The direction the arrow points, in degrees clockwise from the x-axis. For example, 0 points left, and 90 points down. The angle must be divisible by 90.

Remarks

Several methods exist in ControlPaint to draw various styles of triangle arrows, but all of them use a fixed size and color. DrawArrow enables you to provide a custom color for an arrow and to draw it in any direction, at any size.

Exceptions

Exception Type Condition
ArgumentNullException The g parameter is a null reference (Nothing in Visual Basic).
ArgumentOutOfRangeException The angle parameter is not divisble by 90.

See Also

ControlRenderer Class | Skybound.Rebar.Rendering Namespace