Download Quantum Data 881/882 SDK 1.0 Programmer`s Guide
Transcript
RepPixel Class Des cription Color Replicates a pixel throughout a 32-bit integer. The output of this function is in suitable form to be used as input to the SetColor0(), SetColor1(), or Set_Pmask() functions. For example, given a pixel size of 4 and an input value of 5, the return value is 0x55555555. An input value of 0x01234567 produces a return value of 0x77777777, and so on. Syntax uint32 RepPixel( uint32 pixelvalue ) pixelvalue Return value Example Given a pixel size of n bits, then LSBs of the input argument (the 32-n MSBs are ignored) are replicated 32/n times to fill the 32-bit return argument. This example draws an image that has a filled rectangle at the uppet left corner of the screen. /* Establish number of image versions. */ SetVersions(0); /* Setup look-up-table for colors white and black and colors red, green and blue */ SetLut(BW|HUERGB); init_canvas(); /* Clear the screen with black. */ BlackFillVuport(); SetColor1(RepPixel(4)); FillRect(100, 100, 0, 0); Quantum Data 881/882 SDK 1.0 Pro gra mmer’s Guide (Rev. A2) 139