Re: Printing lines, shapes and pixmaps from a gnome canvas
- From: Jean Bréfort <jbrefort wanadoo fr>
- To: Michael Meeks <michael ximian com>
- Cc: gnome-print-list gnome org
- Subject: Re: Printing lines, shapes and pixmaps from a gnome canvas
- Date: Thu Mar 13 15:12:45 2003
Hi Michael,
Michael Meeks wrote:
Sounds like this is a great idea. I tend to think though, that it's
better not to do this as an extra function, but instead to add a GObject
GInterface such as 'GPrintable' or something - such that objects can
implement that to flag that they support printing (?). Then eg. an
embedded widget can implement it if it feels that it can print itself -
otherwise perhaps not. [ A stock widget is almost never a good WYSIWYG
item ].
This seems a good idea. Just I don't think that libgnomecanvas is the
right place for GPrintable definition, libgnomeprint would be much
better, I suppose.
It ran out of space and got OOM killed I guess. The way to find this is
to run it in gdb:
gdb foo-test
r
... wait until it's into the long run ...
<control>-C
bt
And post a stack-trace and/or it'll become obvious where the problem is
I guess. It'd be great to fix that loop asap
I did that. The result is:
#0 0x40642c7b in art_pri_bubble_up (pq=0x96b7523, vacant=882866,
missing=0x96b93e8) at art_svp_intersect.c:98
#1 0x40642d49 in art_pri_insert (pq=0x82c5b50, point=0x96b7523)
at art_svp_intersect.c:116
#2 0x40643ca4 in art_svp_intersect_test_cross (ctx=0x82c7170,
left_seg=0x8249098, right_seg=0x82c5b50, break_flags=ART_BREAK_LEFT)
at art_svp_intersect.c:1101
#3 0x4064402e in art_svp_intersect_insert_cross (ctx=0x82c7170,
seg=0x8249160)
at art_svp_intersect.c:1167
#4 0x40644421 in art_svp_intersect_insert_line (ctx=0x82c7170,
seg=0x8249160)
at art_svp_intersect.c:1341
#5 0x40644b3b in art_svp_intersector (in=0x8228b60, out=0x96b7523)
at art_svp_intersect.c:1785
#6 0x40647a75 in art_svp_vpath_stroke (vpath=0x96b7523, join=158037283,
cap=158037283, line_width=1.8734380140671384e-308,
miter_limit=1.8734380140671384e-308, flatness=1.8734380140671384e-308)
at art_svp_vpath_stroke.c:691
#7 0x40091181 in gpb_stroke (pc=0x8248f48, bpath=0x6bc58)
at gnome-print-rbuf.c:296
#8 0x4007c5c7 in gnome_print_stroke_bpath (pc=0x8248f48, bpath=0x822fe50)
at gnome-print.c:341
#9 0x40084eb5 in gpm_render (dest=0x8248f48, data=0x822fe50 "", pos=30,
len=42846, pageops=1) at gnome-print-meta.c:591
#10 0x4008565a in gnome_print_meta_render_data (ctx=0x8248f48,
data=0x826b778 "GNOME_METAFILE-3.0", length=42876)
at gnome-print-meta.c:757
#11 0x40093760 in gpf_render_buf (frgba=0x82379d8, box=0xbfffe9b0)
at gnome-print-frgba.c:442
#12 0x400931a7 in gpf_image (pc=0x6bc58, affine=0xbfffea40, px=0x8261b70
"",
w=128, h=78, rowstride=512, ch=-1073747552) at gnome-print-frgba.c:333
#13 0x4007c886 in gnome_print_image_transform (pc=0x82379d8,
affine=0xbfffea40, px=0x8261b70 "", w=128, h=78, rowstride=512, ch=4)
at gnome-print.c:361
#14 0x40089f1d in gnome_print_multipage_image (pc=0x6bc58,
affine=0x96b7523,
px=0x96b7523 "\b\031", w=158037283, h=158037283, rowstride=158037283,
ch=158037283) at gnome-print-multipage.c:239
#15 0x4007c886 in gnome_print_image_transform (pc=0x82c89b0,
affine=0xbfffebb0, px=0x8261b70 "", w=128, h=78, rowstride=512,
ch=-1073747392) at gnome-print.c:361
...
I made it several times. The first line encontered each time is #6.
Current state of the code is available upon request.
It sounds like you're doing some great work :-) keep it up, it'd be
worth posting a link to some place where you've uploaded the code so
interested people can have a poke.
I don't think it is so great. I just wrote abourt 50 lines and used
already existing functions in libgnomeprint.
The code has been umploaded and is available at:
http://jean.brefort.free.fr/info/libgnomeprintablecanvas.tar.bz2
It is based on libgnomecanvas-2.0.5
I changed every name from GnomeCanvas to GnomePrintableCanvas to avoid
interferences with the official canvas.
Best regards,
Jean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]