[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need speedy graphics help
I need a quick procedure to out put an array of ints from 0-15 (ie. colors)
to a graphics window. Below is one I thought would work:
void printpic(void)
{
int i,j;
Rect r1;
GetPortRect(&r1);
SetPenSize(2,1);
for (j = 0; j < HEIGHT; j++) {
for (i = 0; i < WIDTH ; i++) {
SetDithColor((ColorsDith) col[i][j]);
MoveTo(2*i,j);
Line(2,1);
}
}
}
I tried this when I had a graphics window open in ORCA/C 2.0 but it didn't
work. SetDithColor() fills a pen with a pattern for color 0 through 15. Can
anyone give me some speedy help?
--
Steven Eric Schwartz "What a wondrous piece of work is man, how noble in
(schwarts@cps.msu.edu) reason, how infinite in faculties, in form and moving
125 East Wilson Hall how express and admirable, in action how like an
East Lansing, MI 48825 angel, in apprehension how like a god ..." -Hamlet