Вы находитесь на странице: 1из 4

Abakus VCL

Mask Components

AbakusMaskcontrolsareasetwiththeopportunitytochangetheshapeofthecontrolby
meansofcolorareasofabitmap.

Tableofcontents

Componenthierarchy
Components
TAbCustomBmpMask
TAbBmpMask
TAbCustomBmpMaskCanvas
TAbBmpMaskCanvas
TAbCustomBmpMaskMeter
TAbBmpMaskMeter

Component hierarchy



Components

TAbCustomBmpMask
ThisistheparentofourbitmapMaskcontrols.Thiscontrolisnotvisibleinthecomponent
toolbar.

Property Typ default description

AutoSize Boolean true iftruethenthesizeofthecomponentwillbe


adjustedaccordingthePicturesize

ColorShape TColor clBlue responsibleforthecomponentshape.All


areasofthepicturewiththiscolorare
excluded fromthecomponentshape.

Picture TBitmap MaskBitmap

Method description

procedureChange Callthistoupdatethedynamicpartofthecomponent.

TAbBmpMask

DerivedfromTAbCustomBmpMask

TAbCustomBmpMaskCanvas
DerivedfromTAbCustomBmpMask

Property Typ default description

ColorCanvas TColor clRed responsibleforthecomponentshape.All


areasofthepicturewiththiscolorare
includedinthecustomercanvas.

Event Typ description

OnChange TOnChangeEvent TheOnChangeEventoccurswhenthecustomer


canvaspartneedstoredraw.
Ifthiseventisassignedtheyouareresponsibleto
drawthecustomercanvas

TOnChangeEvent=Procedure(can:TCanvas)ofObject

ThecomponentcreatesarectanglearoundallpixelincolorColorCanvas,abitmapwith
thedimensionofthisrectangleiscreatedandisusedforadoublebufferedgraphictoavoid
flickering.
Youcangetthewidth/heightofthecanvasbymeansoftheClipRect(can.ClipRect).

Example:

procedure TForm1.AbBMaskCanvas1Change(can:TCanvas)
var
w,h:Integer
begin
//getthewidthandheight
w:=can.ClipRect.Right
h:=can.ClipRect.Bottom

//fillthetotalareainclLime
can.Brush.Style:=bsSolid
can.Brush.Color:=clLime
can.Pen.Color:=clLime
can.Pen.Style:=psSolid

can.Rectangle(Rect(0,0,w,h))

//orcallcan.Rectangle(can.ClipRect)

end

TAbBmpMaskCanvas
DerivedfromTAbCustomBmpMask
AbCustomBmpMaskMeter
DerivedfromTAbCustomBmpMaskCanvas

Property Typ default description

Value Single 0 TheValueofananalogsignal

ValueFrom Single 0 Rangestartvalue

ValueTo Single 100 Rangeendvalue

ColBackground TColor clAqua Backgroundcolorofthecustomercanvas

ColForeground TColor clLime Foregroundcolor(barcolor)ofthecustomer


canvas

ApublicpropertyPPHcontainsthecurrentValueinPartsPerHundred(%).

TAbBmpMaskMeter
DerivedfromTAbCustomBmpMaskMeter

Вам также может понравиться