« il: 18 Settembre 2013, 00:35:21 »
Riporto questa discussione apparsa nella mailing list ufficiale:
"
I have this strange problem in one of my projects.
When placing an image on the PdfSurface I get strange things happening.
In the project when the image is smaller than 280 x 390 it is on the
pdf. When the image is just 5 pixels more in either width, height or
both I get a signal 11.
I tried to reproduce the problem in a small project (see attachment).
Only now, even if the image is smaller than 280 x 390 (tried with both a
210 x 210 and a 150 x 150 image) the signal 11 appears!
I'm not getting this, as the code is the same (copy paste from original
project and deleted some unneeded variables and changed some paths that's all)
I'm using two different methods of adding the image.
1. Using: Cairo.Source = Cairo.ImagePattern(Image.Load("Icons/silhouts-150.png"),20, 150)
Cairo.Paint()
2. Using: Cairo.Source = Cairo.ImagePattern(Image.Load("Icons/silhout.png"))
Cairo.Rectangle(20, 22, 560, 790)
Cairo.Fill()
The first one I used before in another project and works just fine there
(images there are no bigger than 128 x 128, never had any trouble).
The second one is because I aim at putting a watermark on the page of
the pdf, hence using a rectangle to fill with the image.
I get the second one working in the original project if image is no
bigger than 280 x 390, but I need it bigger.
Images in the Icons folder of attached projects are:
silhouts-150.png -> 150 x 150
silhouts-210.png -> 210 x 210
silhout.png -> 560 x 790
Am I seriously overlooking something and gone a bit blind...?
Or is something else happening?
Hope someone has answers...
--
Kind regards,
Willy "
"
Have you tried pressing Button4 and then Button1? This didn't result in a
Segfault here. Anyway, pressing Button1 first does...
Regards,
Tobi "
"
a thing ...
for example for ReportLabel25
put only border on left/bottom/right... the result will be better
T
L Tittle R
B
L data R
B
L data R
B
idem for H array
T T T
L data R data R data R
B B B
in other case the intermediate line will be double than the extern border
Fabien Bodard "
"
Not here, staring with the last and next the first button still gives
the segfault clicking the first one.
Funny it works for you this way but not the other way around.
Kind regards,
Willy "
"
Hi,
Everything should be fixed in revision #5846. Can you confirm?
--
Benoît Minisini "
"
Yes Benoît I can confirm that it is fixed.
Willy "
"
I'm almost sure that you can workaround the bug by storing the image
into a global variable before using it with Cairo.ImagePattern().
Tell me if it works for you, otherwise I will see what I can do.
Regards,
--
Benoît Minisini "
"
Well Benoît,
Kendek already offered to patch the gb.cairo bug fix into his 3.4.2 PPA
(the one I am using). And since I already updated my Gambas version with
his patched one all is working just fine.
The application I need the fix for is one at work. Iḿ using PPA Kendek
there as well on all systems, so I should be fine.
But I will give your suggestion a try on a VM where I have a non updated
3.4.2 from PPA Kendek. Just out of curiosity
Thanks,
--
Kind regards,
Willy "
"
i revised the commit and the diff can be put into dsc sources of venenux
packages with out problem..
about if patch works, i'll try made a project and test if pdf generation
works when using cairo.. i'll try with the web reports that i 'll made for
payroll/asistance system
Picorro Lenz "
« Ultima modifica: 23 Settembre 2013, 11:55:15 da vuott »
Registrato
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »