[Gambas-user] Drawing Areas, painting on them, and printing the results...

Stephen sbungay at ...3301...
Wed Sep 3 22:40:57 CEST 2014


On 09/03/2014 04:27 PM, Tobias Boege wrote:
> On Wed, 03 Sep 2014, Stephen wrote:
>> On 09/03/2014 02:33 PM, Jussi Lahtinen wrote:
>>>> You asked why am I using 10 drawing areas, oddly enough the answer is to
>>>> simplify things from a layout standpoint...
>>> Just figure out how to draw one card and make multiple copies of it to same
>>> one big drawing area..?
>>>
>>>
>> 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. The drawing portion of
>> the program does not have to be concerned with placing an item on a page
>> (one large DrawingArea), and it doesn't care where the DrawingArea it is
>> manipulating is going to be placed, another piece of code is concerned
>> with that functionality.
>> All well and good, until we get to printing...
>>>> Now to print the darn things.
>>>>
>>> Yeah... to print the things you need to give the same drawing commands to
>>> the Printer object. See how above would make things simple...
>>> Or you need to give picture of the wanted result for the Printer object.
>>> Not sure what is reasonable way to do this.
>>>
>>>
>>    I was thinking of taking the panel containing the drawing areas,
>> turning it into one big bitmap, and then spooling that file off to the
>> printer. Has anyone out there done this kind of thing?
>>
> Sounds a bit weird. A Printer object is also a potential drawing device,
> so you shouldn't take screenshots to print something of which your program
> knows how to reproduce it.
>
> Do you have a feeling by now how painting works in Gambas (or how it is
> supposed to work)? If not, I have some spare time the next days... As far
> as my experience goes, painting is a black box for many newbies. But when
> you get used to it, it makes kinda sense :-)
>
> Regards,
> Tobi
>
Hi Tobi;

   Yeah I'm slowly coming to grips with painting. I wasn't thinking of 
doing a screen shot. Painting is a bit... err... different, not at all 
how I expected it to work, but oh well, one never stops learning.
   Thanks for the offer... I'll take you up on it if I get stuck.

-- 
Kindest Regards
Stephen A. Bungay, Prop.
Smarts On Site Information Systems





More information about the User mailing list