menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ArrowPaint - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ArrowPaint

    Helper routines for drawing arrow buttons.

    Inheritance
    System.Object
    ArrowPaint
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public sealed class ArrowPaint

    Methods

    CenterInRect(Rectangle, Size)

    Calculates coordinates for a centered rectangle.

    Declaration
    public static Rectangle CenterInRect(Rectangle rect, Size size)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rect

    The existing bounds.

    System.Drawing.Size size

    The size of the rectangle to be centered.

    Returns
    Type Description
    System.Drawing.Rectangle

    A rectangle inside the specified bounds.

    DrawArrow(Graphics, Rectangle, ArrowType, Point, Color)

    Loads the bitmap from manifest and paints it substituting black pixels with a new color.

    Declaration
    public static void DrawArrow(Graphics g, Rectangle bounds, ArrowType arrowType, Point offset, Color arrowColor)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    A Graphics object used to draw the bitmap.

    System.Drawing.Rectangle bounds

    A Rectangle which contains the boundary data of the rectangle.

    ArrowType arrowType

    The type of button to draw.

    System.Drawing.Point offset

    A Point that specifies pixels to offset the bitmap from its origin point.

    System.Drawing.Color arrowColor

    The new color used to substitute black pixels.

    Remarks

    The DrawArrow routine will substitute black pixels of the original bitmap and draw them with the specified forecolor. The bitmap is centered inside the specified bounds. Use the offset if you want to display a "pressed button" state. If the button is pressed, specify offset = new Point(1, 1).

    PaintIcon(Graphics, Rectangle, Point, Bitmap, Color)

    Paints the specified bitmap substituting black pixels with a new color.

    Declaration
    public static Rectangle PaintIcon(Graphics g, Rectangle visualBounds, Point offset, Bitmap bmp, Color foreColor)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    A Graphics object used to draw the bitmap.

    System.Drawing.Rectangle visualBounds

    A Rectangle which contains the boundary data of the rectangle.

    System.Drawing.Point offset

    A Point that specifies pixel to offset the bitmap from its origin point.

    System.Drawing.Bitmap bmp

    The Bitmap to be drawn on the screen.

    System.Drawing.Color foreColor

    The new color used to substitute black pixels.

    Returns
    Type Description
    System.Drawing.Rectangle

    A Rectangle which contains the boundary data of the drawn bitmap.

    Remarks

    The PaintIcon routine will substitute black pixels of the original bitmap and draw them with the specified forecolor. The bitmap is centered inside the specified bounds. Use the offset if you want to display a "pressed button" state. If the button is pressed, specify offset = new Point(1, 1).

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved