|
InkMode | ||
InkMode DrawMode | ||
Parameters: DrawMode = The mode setting value you wish to set Inkmode to |
||
Returns: NONE | ||
InkMode changes how pen based graphics are to be drawn. By default the InkMode is set to "Normal". This is fastest drawing mode by far! But can be a little uninteresting. So to spice things up, you can also perform various blending effects while drawing. While these should be used sparingly, they can certainly help when dress up your programs appearance! To set the InkMode appropriately, you MUST combine a value from the RENDER TYPE list and the RENDER EFFECTS tables bellow. This is because not all drawing operations will be affected by InkMode changes (i.e. Images and Text aren't). Render Types: 1 - Normal (Draw pixels in the INK colour) 2 - Filled (Not currently in use ) 4 - (Future) 8 - (Future) Render Effects: 16 - Alpha Blend - (Variable Alpha blend the current INK colour with the graphics your drawing over. Use InkAlpha to set the level of transparency) 32 - Alpha Blend 50% (Perform 50 -50 alpha blend between the INK colour and the background) 64 - Alpha Add ( Add's the R/G/B separate values of the INK colour to the backdrop ) 128 - Alpha Sub ( Subtracts the R/G/B separate values of the INK colour from the backdrop) 256 - AND ( performs a Logical AND of the INK colour to the backdrop) 512 - OR ( performs a Logical OR of the INK colour to the backdrop) 1024 - XOR ( performs a Logical Exclusive OR of the INK colour to the backdrop) 2048 - Alpha Mult ( Multiplies the backdrop pixels by the INK colour) 4096 - Inverted Alpha Sub ( Subtracts backdrop colour from the INK colour. This is the inversion of InkMode 128 above) To set it to Normal + AND mode it's be InkMode 1+256 FACTS: * Most drawing operations are performed by the CPU. For operations that read memory such as alpha blending, which can be slow when applying them to images in video memory. We recommend using FX/AFX images when you're after such effects. See CreateFxIMage). * Important Note: We highly recommended you read the Images tutorials also! Mini Tutorial #1: Using Inkmode to create transparent circle graphic.
If you run this example and move the circle over the Box, you should be able to see the box through the circle. Mini Tutorial #2: This example uses the Alpha Mult and Alpha Addition modes.
|
Related Info: | Box | Circle | Dot | DrawShape | Images | Ink | InkAlpha | Line | Quad | RGB | ShadeBox | Tri : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |