grph-raw.mkiv / last modification: 2020-01-30 14:16
%D \module
%D   [       file=grph-raw,
%D        version=2006.08.26, % overhaul of 1997.03.31
%D          title=\CONTEXT\ Graphic Macros,
%D       subtitle=Raw Bitmaps,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Graphic Macros / Raw Bitmaps}

%D \startluacode
%D     function document.TestBitmap(nx,ny)
%D         local random = math.random
%D         local maxbit = 2^24
%D         for i=1,nx do
%D             for i=1,ny do
%D                 context("%06x",random(0,maxbit))
%D             end
%D         end
%D     end
%D \stopluacode
%D \def\TestBitmap#1#2{\ctxlua{document.TestBitmap(#1,#2)}}
%D \blank
%D \startMPcode
%D     draw textext("\bitmapimage[x=100,y=100]{\TestBitmap{100}{100}}") xsized 10cm ;
%D \stopMPcode
%D \blank
%D \startMPcode
%D     draw textext("\bitmapimage[x=200,y=50]{\TestBitmap{50}{200}}") xsized 10cm ;
%D \stopMPcode



       data        {#2}%
       colorspace  {\directdummyparameter\c!color}%
       width       {\directdummyparameter\c!width}%
       height      {\directdummyparameter\c!height}%
       xresolution {\directdummyparameter\c!x}%
       yresolution {\directdummyparameter\c!y}%



\protect \endinput