[Gambas-user] Are these bugs?
Benoit Minisini
gambas at ...1...
Thu Feb 10 17:29:37 CET 2005
On Thursday 10 February 2005 17:22, Eilert wrote:
> I've got a DrawingArea here, let's call it Page (in English so everyone
> can see what I mean...), created on a form named Preview. There are
> several strange things I cannot explain which happened when I created
> the code for it.
>
> From a module named "graphics" I'll call it like this:
>
>
> PUBLIC SUB ShowMeThePage
>
> CollectPageData
>
> MakeUpPage
>
> END SUB
>
>
>
>
> PRIVATE SUB MakeUpPage
>
> Preview.Page.Clear
> Preview.Page.Height = Paperlength
> Preview.Page.Width = Paperwidth
>
> Draw.Begin(Preview.Page)
> Preview.Page.ForeColor = Color.RGB(190,190,190)
>
> 'here a lot of grid lines are made, just like this:
>
> Preview.Page.Line( bla bla bla bla)
>
> Draw.End
>
> END SUB
>
>
> Now, this is what happened:
>
> First I tried Draw.ForeColor = HexValue and = Color.RGB(something)
> instead of Preview.Page.ForeColor. The program will crash with Sig 11, a
> message pops up to inform Benoit :-), but Gambas will continue to run.
> So I tried Preview.Page.ForeColor, that is ok and it runs as expected.
>
> Second, I added some code to draw blue and green lines, but now the
> whole Preview will just be cleared as soon as this line of code is
> reached, everything turns white.
>
> Third, I added some code to ShowMeThePage, writing a few values into the
> Preview, and here (within ShowMeThePage) much to my surprise, the
> Draw.ForeColor runs fine, i. e. I added
>
> Draw.Begin(Preview.Page)
> Draw.ForeColor = 0 'intended to be black
> Draw.Text(blabla...)
> Draw.End
>
> So now I tried Draw.ForeColor = 0 in the MakeUpPage, and voilà! Here we
> went right through, a black line appeared, nothing was cleared.
>
> I cannot explain what I did wrong, maybe I misunderstood the usage of
> color.RGB or what?
>
> Rolf
>
>
Please send your project, otherwise it is almost impossible for me to find the
bug...
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list