DrawFilledRoundedRectangle(Int32,Single,Single,Single,Single,Single,Int32,Boolean) Method
Draws a filled and rounded rectangle on a GdPicture image. The filling color is specified with an integer value.
public GdPictureStatus DrawFilledRoundedRectangle(
int ,
float ,
float ,
float ,
float ,
float ,
int ,
bool
)
public function DrawFilledRoundedRectangle(
: Integer;
: Single;
: Single;
: Single;
: Single;
: Single;
: Integer;
: Boolean
): GdPictureStatus;
public function DrawFilledRoundedRectangle(
: int,
: float,
: float,
: float,
: float,
: float,
: int,
: boolean
) : GdPictureStatus;
public: GdPictureStatus DrawFilledRoundedRectangle(
int ,
float ,
float ,
float ,
float ,
float ,
int ,
bool
)
public:
GdPictureStatus DrawFilledRoundedRectangle(
int ,
float ,
float ,
float ,
float ,
float ,
int ,
bool
)
'Declaration
Public Overloads Function DrawFilledRoundedRectangle( _
ByVal As Integer, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Integer, _
ByVal As Boolean _
) As GdPictureStatus
Parameters
- ImageID
- GdPicture image identifier.
- DstLeft
- Specifies the x-coordinate of the upper-left corner of the rectangle.
- DstTop
- Specifies the y-coordinate of the upper-left corner of the rectangle.
- Width
- Specifies the width of the rectangle.
- Height
- Specifies the height of the rectangle.
- Radius
- Radius value between 0 and 90.
- FillColor
- Color of the filled circle. A suitable color value can be obtained by using the ARGBI() method.
- AntiAlias
- Set to True to apply the Antialiasing algorithm else False.
Return Value
A member of the GdPictureStatus enumeration.
Filling a 250x200 pixels orange rounded rectangle with a top left corner at 100,200.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int top = 200, left = 100, width = 250, height = 200, cornerRadius = 20;
int imageID = gdpictureImaging.CreateNewGdPictureImage(600, 600, System.Drawing.Imaging.PixelFormat.Format24bppRgb, gdpictureImaging.ARGBI(0, 0, 0, 0));
// Fill the rounded rectangle. The AntiAlias parameter is set to true to apply antialiasing algorithm, i.e. to improve the appearance of the rectangle boundary.
gdpictureImaging.DrawFilledRoundedRectangle(imageID, left, top, width, height, cornerRadius, gdpictureImaging.ARGBI(255, 255, 165, 0), true);
gdpictureImaging.SaveAsPNG(imageID, "output.png");
// Release used resources.
gdpictureImaging.ReleaseGdPictureImage(imageID);
}