Class tpolygon

Unit

Declaration

type tpolygon = class(tpaintbox)

Description

This item has no description. Showing description inherited from tpaintbox.

Widget dedicated to custom drawing: fill its onpaint event with drawing instructions on the acanvas: tcanvas parameter, as in the following example, which fills the background, draws a shaded ellipse, a diagonal line and a few points.

uses
  main_mfm;

procedure tmainfo.paintbox1_paint(const sender: twidget;
               const acanvas: tcanvas);
var
  x: integer;
begin
  acanvas.fillrect(makerect(0, 0, sender.bounds_cx, sender.bounds_cy), cl_ltgray);

  acanvas.fillellipse(makerect(sender.bounds_cx div 2, sender.bounds_cy div 2, 100, 100), cl_gray, cl_dkgray);

  acanvas.drawline(
    makepoint(0, 0),
    makepoint(sender.bounds_cx, sender.bounds_cy),
    cl_yellow
  );

  for x := 0 to 9 do
    acanvas.drawpoint(makepoint(x, 0), cl_magenta);
end;

image

Hierarchy

Overview

Fields

Protected fstate: polygonstatesty;

Methods

Protected procedure change;
Protected procedure dopaintforeground(const canvas: tcanvas); override;
Protected procedure checkgeometry(const appmm: real);
Protected procedure clientrectchanged; override;
Protected procedure bitmapchanged(const sender: tobject);
Public constructor create(aowner: tcomponent); override;
Public destructor destroy; override;

Properties

Published property poly_edgecount: integer read finfo.edgecount write setpoly_edgecount default 0;
Published property poly_edgeradiusmm: real read finfo.edgeradiusmm write setpoly_edgeradiusmm;
Published property poly_edgeradiusvertexcount: integer read finfo.edgeradiusvertexcount write setpoly_edgeradiusvertexcount default 2;
Published property poly_rotation: real read finfo.rotation write setpoly_rotation;
Published property poly_color: colorty read finfo.color write setpoly_color default cl_white;
Published property poly_colorline: colorty read finfo.colorline write setpoly_colorline default cl_black;
Published property poly_colorlinegap: colorty read finfo.colorlinegap write setpoly_colorlinegap default cl_transparent;
Published property poly_linewidthmm: real read finfo.linewidthmm write setpoly_linewidthmm;
Published property poly_dashes: ansistring read finfo.dashes write setpoly_dashes;
Published property poly_joinstyle: joinstylety read finfo.joinstyle write setpoly_joinstyle default js_miter;
Published property poly_brush: tmaskedbitmap read finfo.brush write setpoly_brush;
Published property poly_brushoffset_x: integer read finfo.brushoffset.x write setpoly_brushoffset_x;
Published property poly_brushoffset_y: integer read finfo.brushoffset.y write setpoly_brushoffset_y;
Published property poly_smooth: boolean read finfo.smooth write setpolysmooth default false;

Description

Fields

Protected fstate: polygonstatesty;

This item has no description.

Methods

Protected procedure change;

This item has no description.

Protected procedure dopaintforeground(const canvas: tcanvas); override;

This item has no description.

Protected procedure checkgeometry(const appmm: real);

This item has no description.

Protected procedure clientrectchanged; override;

This item has no description.

Protected procedure bitmapchanged(const sender: tobject);

This item has no description.

Public constructor create(aowner: tcomponent); override;

This item has no description.

Public destructor destroy; override;

This item has no description.

Properties

Published property poly_edgecount: integer read finfo.edgecount write setpoly_edgecount default 0;

This item has no description.

Published property poly_edgeradiusmm: real read finfo.edgeradiusmm write setpoly_edgeradiusmm;

This item has no description.

Published property poly_edgeradiusvertexcount: integer read finfo.edgeradiusvertexcount write setpoly_edgeradiusvertexcount default 2;

This item has no description.

Published property poly_rotation: real read finfo.rotation write setpoly_rotation;

This item has no description.

Published property poly_color: colorty read finfo.color write setpoly_color default cl_white;

This item has no description.

Published property poly_colorline: colorty read finfo.colorline write setpoly_colorline default cl_black;

This item has no description.

Published property poly_colorlinegap: colorty read finfo.colorlinegap write setpoly_colorlinegap default cl_transparent;

This item has no description.

Published property poly_linewidthmm: real read finfo.linewidthmm write setpoly_linewidthmm;

This item has no description.

Published property poly_dashes: ansistring read finfo.dashes write setpoly_dashes;

This item has no description.

Published property poly_joinstyle: joinstylety read finfo.joinstyle write setpoly_joinstyle default js_miter;

This item has no description.

Published property poly_brush: tmaskedbitmap read finfo.brush write setpoly_brush;

This item has no description.

Published property poly_brushoffset_x: integer read finfo.brushoffset.x write setpoly_brushoffset_x;

This item has no description.

Published property poly_brushoffset_y: integer read finfo.brushoffset.y write setpoly_brushoffset_y;

This item has no description.

Published property poly_smooth: boolean read finfo.smooth write setpolysmooth default false;

This item has no description.


Generated by PasDoc 1.0.4.