[Gambas-user] Drawing Areas, painting on them, and printing the results...
Jussi Lahtinen
jussi.lahtinen at ...626...
Wed Sep 3 22:53:30 CEST 2014
> Since each drawing area is the same size, the same drawing commands,
> right down to the coordinates, are used to draw on each one, only a
> portion of the contents of each small DrawingArea changes (in this case
> its a QR Code). Everything else remains the same.
Sounds perfect place to pass coordinates and QR Code as arguments for the
drawing function.
Then call it like this:
Public Sub Cards_Draw()
Dim ii As Integer, jj As Integer
For ii = 0 to 2 '' 10 cards? asymmetric layout?
For jj = 0 to 2
DrawCard(ii * iCardSizeX, jj * iCardSizeY, iQRCode[(ii * 3) + jj])
Next
Next
End
And to print the same thing, just:
Public Sub MyPrinter_Draw()
Dim ii As Integer, jj As Integer
For ii = 0 to 2 '' 10 card? asymmetric layout?
For jj = 0 to 2
DrawCard(ii * iCardSizeX, jj * iCardSizeY, iQRCode[(ii * 3) + jj])
Next
Next
End
But maybe I don't fully understand what you are trying to achieve.
Jussi
More information about the User
mailing list