BBjDrawPanel::drawLineTo

Description

In BBj 16.0 and higher, this method moves the pen from its current position on the BBjDrawPanel to the new position defined by (x,y), drawing as it moves. It uses the current pen settings.

Syntax

Return Value

Method

void

drawLineTo(int x, int y)

Parameters

Variable

Description

x

Horizontal position of the end of the line.

y

Vertical position of the end of the line.

Return Value

None.

Remarks

None.

Example

rem ' BBjDrawPanel::drawLineTo
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "BBjDrawPanel::drawLineTo"
window! = sysgui!.addWindow(25,25,1250,300,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
window!.setTrack(0)
window!.setFont(sysgui!.makeFont("Arial",8,0))
drawpanel! = window!.getDrawPanel()
for i = 0 to 10
  x = i * 110
  w = (i+1) * 0.25
  drawpanel!.drawText(x+25,25,"setPattern("+str(i)+")")
  drawpanel!.drawText(x+25,50,"setLineWidth("+str(w)+")")
  drawpanel!.setPattern(i)
  drawpanel!.setPenWidth(w)
  color! = sysgui!.makeColor(rnd(127),rnd(127),rnd(127))
  drawpanel!.setPenColor(color!)
  adj = (i-5) * 5
  drawpanel!.moveTo(x+25,100)
  drawpanel!.drawLineTo(x+100,100+adj)
  drawpanel!.moveTo(x+25,150)
  drawpanel!.drawLineTo(x+100,150+adj)
  drawpanel!.moveTo(x+25,200)
  drawpanel!.drawLineTo(x+100,200+adj)
  drawpanel!.moveTo(x+25,250)
  drawpanel!.drawLineTo(x+100,250+adj)
next i
process_events
eoj:
release

See Also

BBjAPI

BBjSysGui

BBjWindow

BBjDrawPanel

DRAW Mnemonic - Pen Draw (SYSGUI)

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