user3780428
user3780428

Reputation: 9

How to draw Vector rounded rectangle in Graphics32 library? Is this possible?

How to draw vector rounded rectangle in Graphics32 library? Is this possible?

Not a raster, should be vector.

Upvotes: 0

Views: 1291

Answers (3)

CWBudde
CWBudde

Reputation: 1803

The latest code in the trunk (SVN) contains the VPR vector graphics engine. It's still somehow in a beta state, but available since several years now. With this you can draw a rounded rectangle quite easily:

uses
  GR32, GR32_Polygons, GR32_VectorUtils;

[...]
var
  Points: TArrayOfFloatPoint;
begin
  Points := RoundRect(Rect(RectLeft, RectTop, RectRight, RectBottom), Radius);
  PolyPolygonFS(MyBitmap32, Points, Color32);
end;

where RectLeft, RectTop, Radius, Color32 has to be specified by the user.

Upvotes: 1

A. Fornés
A. Fornés

Reputation: 203

If you do a web search, you will find a unit called G32_Interface, with routines for drawing true type fonts, bezier curves, ellipse and rotated ellipse, rounded polygons and splines. Its author is Roman Gudchenko.

Also check this link draw antialiased rounded rectangle

Upvotes: 1

David Heffernan
David Heffernan

Reputation: 613013

Graphics32 is a raster image library. Its primary image type is TBitmap32 which is a raster image. It does not have vector image capabilities.

Upvotes: 2

Related Questions