Prima

 view release on metacpan or  search on metacpan

Prima/PS/Unicode.pm  view on Meta::CPAN

"\x{032A}" => 'bridgebelowcmb',
"\x{032B}" => 'dblarchinvertedbelowcmb',
"\x{032C}" => 'caronbelowcmb',
"\x{032D}" => 'circumflexbelowcmb',
"\x{032E}" => 'brevebelowcmb',
"\x{032F}" => 'breveinvertedbelowcmb',
"\x{0330}" => 'tildebelowcmb',
"\x{0331}" => 'macronbelowcmb',
"\x{0332}" => 'lowlinecmb',
"\x{0333}" => 'dbllowlinecmb',
"\x{0334}" => 'tildeoverlaycmb',
"\x{0335}" => 'strokeshortoverlaycmb',
"\x{0336}" => 'strokelongoverlaycmb',
"\x{0337}" => 'solidusshortoverlaycmb',
"\x{0338}" => 'soliduslongoverlaycmb',
"\x{0339}" => 'ringhalfrightbelowcmb',
"\x{033A}" => 'bridgeinvertedbelowcmb',
"\x{033B}" => 'squarebelowcmb',
"\x{033C}" => 'seagullbelowcmb',
"\x{033D}" => 'xabovecmb',
"\x{033E}" => 'tildeverticalcmb',
"\x{033F}" => 'dbloverlinecmb',
"\x{0340}" => 'gravetonecmb',
"\x{0341}" => 'acutetonecmb',
"\x{0342}" => 'perispomenigreekcmb',

img/rop.c  view on Meta::CPAN

	}
}

/* SEPARABLE(S * D) */
dBLEND_FUNCx(blend_multiply, (UP(D) * (S + INVSA) + UP(S) * INVDA) / 255)

/* SEPARABLE(D * SA + S * DA - S * D) */
dBLEND_FUNCx(blend_screen,   (UP(S) * 255 + UP(D) * (255 - S)) / 255)

#define SEPARABLE(f) (UP(S) * INVDA + UP(D) * INVSA + (f))/255
dBLEND_FUNCx(blend_overlay, SEPARABLE(
	(2 * D < DA) ?
		(2 * UP(D) * S) :
		(UP(SA) * DA - UP(2) * (DA - D) * (SA - S)) 
	))

static dBLEND_FUNC(blend_darken)
{
	BLEND_LOOP {
		register int32_t ss = UP(S) * DA;
		register int32_t dd = UP(D) * SA;

img/rop.c  view on Meta::CPAN

	blend_src_in,
	blend_dst_in,
	blend_src_out,
	blend_dst_out,
	blend_src_atop,
	blend_dst_atop,
	blend_add,
	blend_multiply,
	blend_screen,
	blend_dst_copy,
	blend_overlay,
	blend_darken,
	blend_lighten,
	blend_color_dodge,
	blend_color_burn,
	blend_hard_light,
	blend_soft_light,
	blend_difference,
	blend_exclusion
};

pod/Prima/Drawable.pod  view on Meta::CPAN

( see L</"Graphic context and canvas">) -- except on images.

=item fillMode INTEGER

Affects filling style of complex polygonal shapes filled by C<fillpoly>.
If C<fm::Winding>, the filled shape contains no holes; if C<fm::Alternate>, holes are present
where the shape edges cross.

C<fm::Overlay> flag can be combined with these to counter an intrinsic defect
of filled shaped both in Win32 and X11 that don't exactly follow polygon
vertices. When supplied, it overlays a polygon over the filled shape, so that
the latter falls exactly in the boundaries defined by vertices. This is
desirable when one wants the shape to be defined exactly by polygon vertices,
but is not desirable when a shape has holes in it and is connected in a way
that the polygon overlay may leave visible connection edges over them.

=for podview <img src="windings.gif">

=for html <p><img src="https://raw.githubusercontent.com/dk/Prima/master/pod/Prima/windings.gif">

Default value: C<fm::Winding|fm::Overlay>

=item fillPattern ( [ @PATTERN ] ) or ( fp::XXX ) or IMAGE

Selects 8x8 fill pattern that affects primitives that plot filled shapes:

t/Object/Region.t  view on Meta::CPAN

ok(
	$b->pixel(0,0) == 0 &&
	$b->pixel(1,0) == 0 &&
	$b->pixel(0,1) == 0 &&
	$b->pixel(1,1) == 0,
	"pixels are in correct position (2)"
);

$r = Prima::Region->new( polygon => [0,0,0,5,5,5,5,0, 0,0,0,2,2,2,2,0], fillMode => fm::Winding|fm::Overlay);
render($r);
is( $b->sum, 25 * 255, "overlay polygon with winding");
ok( $r->equals( Prima::Region->new(box => $r->get_boxes)), "is equal (6)");

$r = Prima::Region->new( polygon => [0,0,0,5,5,5,5,0, 0,0,0,2,2,2,2,0], fillMode => fm::Alternate|fm::Overlay);
render($r);
is( $b->sum, 24 * 255, "overlay polygon without winding");
ok( $r->equals( Prima::Region->new(box => $r->get_boxes)), "is equal (7)");

my $d = $b->data;
render($b->to_region);
is_bytes($d, $b->data, "region to image and back is okay");

$b->size(4,4);
$r = Prima::Region->new( box => [-1,-1,3,3, 2,2,3,3]);
render($r);
is_bytes($b->data, ("\xff\xff\x00\x00" x 2).("\x00\x00\xff\xff" x 2), "region outside the box");



( run in 1.369 second using v1.01-cache-2.11-cpan-49f99fa48dc )