BBjDrawPanel::setRound

Description

In BBj 16.0 and higher, this setting can be used to round the corners of subsequent BBjDrawPanel::drawRect rectangles drawn on the BBjDrawPanel. The rounded corner may be symmetrical (xradius = yradius) or it may be a 90-degree segment of an ellipse.

Syntax

Return Value

Method

void

setRound(number x, int y)

Parameters

Variable

Description

x

Horizontal radius of a corner.

y

Vertical radius of a corner.

Return Value

None.

Remarks

Both of these values are initially set to 0 to produce square corners.

Example

rem ' BBjDrawPanel::drawRect

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjDrawPanel::drawRect"
window! = sysgui!.addWindow(25,25,1150,475,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setTrack(0)
window!.setFont(sysgui!.makeFont("Arial",8,0))
drawpanel! = window!.getDrawPanel()
drawpanel!.setPenColor(BBjColor.BLUE)
drawpanel!.setTextColor(BBjColor.BLUE)
drawpanel!.setFillColor(BBjColor.GREEN)
for i = 0 to 10
    x = i * 100 + 25
    w = (i+1) * 0.25
    drawpanel!.setFillType(i)
    drawpanel!.setPattern(i)
    drawpanel!.setPenWidth(w)
    drawpanel!.drawText(x,25,"setPenWidth("+str(w)+")")
    drawpanel!.drawText(x,50,"setPattern("+str(i)+")")
    drawpanel!.drawText(x,75,"setFillType("+str(i)+")")
    drawpanel!.setRound(0,0)
    drawpanel!.drawRect(x,100,75,75)
    drawpanel!.setRound(5,5)
    drawpanel!.drawRect(x,200,50,75)
    drawpanel!.setRound(10,10)
    drawpanel!.drawRect(x,300,75,75)
    drawpanel!.setRound(15,15)
    drawpanel!.drawRect(x,400,75,50)
next i
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjDrawPanel

ROUND Mnemonic - Draw Rounded Rectangles (SYSGUI)

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.