Prima

 view release on metacpan or  search on metacpan

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

716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
"\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

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
        }
}
 
/* 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

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
        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

972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
( 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">
 
 
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

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
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 0.550 second using v1.01-cache-2.11-cpan-26ccb49234f )