On 9/1/2021 1:08 PM, Jairo A. del Rio via ntg-context wrote:
Hi, list!
I want to know if there's a handy way to pass predefined colors, either
RGB or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage.
Say, something like:
\startMPpage
% svg's gold definition
draw bitmapimage(2
Hi, list!
I want to know if there's a handy way to pass predefined colors, either RGB
or CMYK, e.g. those in svg or crayola, to Metafun's bitmapimage. Say,
something like:
\startMPpage
% svg's gold definition
draw bitmapimage(2, 2, "ffd700 ffd700 ffd700 00") scaled 3cm;
\stopMPp
=nx/2,1,-1 do
c[#c+1] = format(%02x,j*s*255)
end
c = table.concat(c,,1,nx)
r[#r+1] = c
end
r = table.concat(r,\r,1,ny)
print(r)
context(r)
end
\stopluacode
\startMPcode
draw
textext(\bitmapimage[x=100,y=100
for typesetting, an
example pixel map with clut, and the output. I would be obliged to get some
comments.
As you're doing a lot of calculations, you can consider using bitmaps
\starttext
\startMPpage
draw
bitmapimage(2,2,334455 667788 99aabb ccddee)
scaled 3cm
better otf/ttf suffix mixup checking
- small datefix for willi
New feature of the day:
\starttext
\startMPpage
draw
bitmapimage(2,2,334455 667788 99aabb ccddee)
scaled 3cm
rotated 15 ;
draw
bitmapimage(2,2,33 55 77 99)
scaled 2cm
rotated 30