[Gambas-user] Drawing

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Thu May 4 11:27:42 CEST 2006


> > If a kind people could make a little example of printing, I will
> > put it with
> > the other Gambas examples :-)
> >
> > Regards,
> >
> > --
> > Benoit Minisini

> -----Original Message-----
> From: gambas-user-admin at lists.sourceforge.net
> [mailto:gambas-user-admin at lists.sourceforge.net]On Behalf Of javier
> romero
> Sent: Wednesday, 03 May 2006 21:55
> To: gambas-user at lists.sourceforge.net
> Subject: RE: [Gambas-user] Drawing
>
>
> Hi, I try to run your example in Gambas 1.0.15, but it does'nt works.
> The first time say me the form is not proper to use in this
> version. After that when run, no buttons appers, only the tab
> stripan there is not way to probe the example.
>
> Regards
> Javier
>

The example printing project was created in Gambas 2. This what Gambas 1
does to any Gambas 2 project – not just this project. You may have guessed
this, as the attachment name was “Printing.Gambas2.V0.0.1.tar”

In general when you open a version 2 project in version 1 you need to:
1.	Save every file again. This includes every class, form and module. You
properly also need to save the hidden .project file.
2.	On a form Gambas 1 and Gambas 2 use different method of positioning
controls. You will need to move the controls and resize the form. See the
comments in the emails for "Incorrect property value"
However I have saved you the trouble of doing it in this case as I have
attached a Gambas 1 version to this email. This is called
“Printing.Gambas1.V0.0.2.tar”

I have made a few small changes to the example. But they are only changes to
the comments – not to the code. This is called “Printing.Gambas2.V0.0.2.tar”
.



ALSO I ASKED A QUESTION IN MY ORIGINAL EMAIL. I WAS HOPING FOR AN ANSWER. I
THINK THIS IS A BUG WITH GAMBAS VERSION 1 AND 2:



There is one problem. This is with the drawing of a SVG file. When you call
Draw.Drawing it always draws the SVG file at the same size. For example the
following:
	Draw.Drawing(SVGDrawing, 10, 10, 110, 110)
and
	Draw.Drawing(SVGDrawing, 10, 10, 210, 210)
produces drawings at the original size of the drawing. The help says you
setting the width and height should scale the drawing. Setting the width and
height appears to have no effect. This means when printing you always get a
thumbnail whether you want it or not.

(You could convert to a Picture, then a Image, then scale, then print. But
this would not scale very well for printing.)

At first the thought this was just a problem with the version of gambas I
was using (1.9.17). But I also created a version of this project in the
stable version Gambas 1.0.15. The problem also appears to be in that version
also. So now I am now thinking the bug is in both versions 1 and 2 of
Gambas.

Try out the example. In ModulePrinting look at the procedure PrintDrawing.
If you uncomment the line Draw.Rect... you can see the size the SVG size
should print out at.

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Printing.Gambas1.V0.0.2.tar
Type: application/x-tar
Size: 102400 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060504/b6f6d3bf/attachment.tar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Printing.Gambas2.V0.0.2.tar
Type: application/x-tar
Size: 61440 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060504/b6f6d3bf/attachment-0001.tar>


More information about the User mailing list