On Sun, 2007-12-09 at 15:03 -0500, Behdad Esfahbod wrote:
> On Sun, 2007-12-09 at 17:58 +0530, Andrew Cowie wrote:
> >=20
> > After doing all that for Pattern and being fairly satisfied with it, I
> > attempted to start testing it only to not be able to find a Cairo
> > function that returns a cairo_pattern_t that's not a constructor [If
> > someone can suggest one, I'd be grateful] so I couldn't actually write
> > a test to exercise this code. Grumble.
>=20
> cairo_get_source().
Thanks Behdad! I specifically needed something that would fetch a native
entity that had not been explicitly instantiated on the Java side, and
Context cr;
ImageSurface s;
Pattern p;
s =3D new ImageSurface(Format.ARGB32, 100, 100);
cr =3D new Context(s);
cr.setSourceRGBA(0.0, 0.0, 1.0, 1.0);
p =3D cr.getSource();
was a perfect example to use in a unit test validating the code paths
for Pattern. Cheers,
AfC
Sydney
|