Update: rending problem!!!
"ultrasony_163" <[email protected]> Mon, 25 Nov 2002 09:07:30 +0800
| Newsgroups | gmane.comp.gnome.lib.libart.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C29462.150BB5B0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_000E_01C29462.150BB5B0"
------=_NextPart_001_000E_01C29462.150BB5B0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: base64
------=_NextPart_001_000E_01C29462.150BB5B0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: base64
PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu
dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w
MC4yODAwLjExMDYiIG5hbWU9R0VORVJBVE9SPg0KPFNUWUxFPjwvU1RZTEU+DQo8L0hFQUQ+DQo8
Qk9EWSBiZ0NvbG9yPSNmZmZmZmY+DQo8RElWPiZuYnNwOzwvRElWPjwvQk9EWT48L0hUTUw+DQo=
------=_NextPart_001_000E_01C29462.150BB5B0--
------=_NextPart_000_000D_01C29462.150BB5B0
Content-Type: text/plain;
name="rend.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="rend.txt"
Hi, sirs,
I meet a problem on rendering a vpath which has crossing segments =
and the crossing point seperates the region into
two parts, the coding is something like this:
=20
ArtVpath vp[] =3D {
{ART_MOVETO, 100, 100},
{ART_LINETO, 100, 0},
{ART_LINETO, 0, 0},
{ART_LINETO, 0, 100},
{ART_LINETO, 200, 100},
{ART_LINETO, 200, 200},
{ART_LINETO, 100, 200},
{ART_LINETO, 100, 100},
{ART_END, 0, 0}
};
ArtSVP* s, * svp =3D art_svp_from_vpath(vp);
if(svp){
s =3D art_svp_uncross(svp);
art_svp_free(svp);
svp =3D art_svp_rewind_uncrossed (s, ART_WIND_RULE_NONZERO);
art_svp_free(s);
}
if(svp){
=20
art_u8* buffer =3D art_new (art_u8, WIDTH*HEIGHT*BYTES_PER_PIXEL);
if(buffer){
=20
art_u32 color =3D (0xFF << 24) | (0x00 <<16) | (0x00<<8) | (0xAA);
=20
art_rgb_fill_run(buffer, 0xFF, 0xFF, 0xFF, WIDTH * HEIGHT);
art_rgb_svp_alpha(svp, 0, 0, WIDTH, HEIGHT, color, buffer, WIDTH * =
BYTES_PER_PIXEL, NULL);
...
}
}
appreciate if u can offer solution to handle this problem early.
Any comments will be greatly helpful!!
=20
ultrasony
20/11/2002
------=_NextPart_000_000D_01C29462.150BB5B0--