Revision history for KeyPgPutgraphics


Revision [22013]

Last edited on 2017-11-21 01:11:43 by JeffMarshall [fix page link name case]
Additions:
##[[KeyPgAndGfx|AND]]## : Destination pixels are bitwise ##[[KeyPgOpAnd|AND]]##ed with source pixels. See below.
##[[KeyPgOrGfx|OR]]## : Destination pixels are bitwise ##[[KeyPgOpOr|OR]]##ed with source pixels. See below.
##[[KeyPgXorGfx|XOR]]## : Destination pixels are bitwise ##[[KeyPgOpXor|XOR]]##ed with source pixels. See below.
Deletions:
##[[KeyPgAndGfx|AND]]## : Destination pixels are bitwise ##[[KeyPgOpand|AND]]##ed with source pixels. See below.
##[[KeyPgOrGfx|OR]]## : Destination pixels are bitwise ##[[KeyPgOpor|OR]]##ed with source pixels. See below.
##[[KeyPgXorGfx|XOR]]## : Destination pixels are bitwise ##[[KeyPgOpxor|XOR]]##ed with source pixels. See below.


Revision [21725]

Edited on 2016-12-04 09:06:59 by fxm [Refined sentence]
Additions:
The ##//source//## and ##//target//## image buffers must be valid image buffers. Valid image buffers are created using the ##[[KeyPgGetgraphics|Get]]## or ##[[KeyPgImagecreate|ImageCreate]]## statements. Valid image buffers can be specified in a ##**Put**## statement using an array name with optional index (but never with empty parentheses), or a pointer with optional index.
Deletions:
The ##//source//## and ##//target//## image buffers must be valid image buffers. Valid image buffers are created using the ##[[KeyPgGetgraphics|Get]]## or ##[[KeyPgImagecreate|ImageCreate]]## statements. Valid image buffers can be specified in a ##**Put**## statement using an array name with optional index, or a pointer with optional index.


Revision [21652]

Edited on 2016-11-01 01:59:58 by fxm [Formatting]

No Differences

Revision [21651]

Edited on 2016-11-01 01:50:20 by fxm [formatting]
Additions:
The ##AND##, ##OR## and ##XOR## methods produce different results depending on the current color depth, as pixels are stored in different formats; see [[GfxInternalFormats|Internal pixel formats]] for details.
Deletions:
The ##AND##, ##OR## and ##XOR## methods produce different results depending on the current color depth, as pixels are stored in different formats; see [[GfxInternalFormats|Internal pixel formats]] for details.


Revision [21645]

Edited on 2016-10-30 18:55:59 by fxm [Formatting]
Additions:












Revision [21274]

Edited on 2016-03-19 10:13:08 by fxm [Clarification]
Additions:
The ##**Put**## statement can be used to draw an image onto another image or screen. The ##//x//## and ##//y//## coordinates are affected by the last call to the ##[[KeyPgViewgraphics|View]]## and ##[[KeyPgWindow|Window]]## statements, and plotted image respects the current clipping region set by last call to the ##[[KeyPgViewgraphics|View]]## statement. The source image can overflow the destination buffer or screen (then the copied image is clipped accordingly).
Deletions:
The ##**Put**## statement can be used to draw an image onto another image. The ##//x//## and ##//y//## coordinates are affected by the last call to the ##[[KeyPgViewgraphics|View]]## and ##[[KeyPgWindow|Window]]## statements, and plotted image respects the current clipping region set by last call to the ##[[KeyPgViewgraphics|View]]## statement. The source image is clipped if it is drawn outside the destination buffer.


Revision [21101]

Edited on 2016-03-13 09:36:39 by fxm [Formatting]
Additions:













Revision [20475]

Edited on 2016-02-10 16:07:25 by DkLwikki [Update link format]
Additions:
##[[KeyPgPsetGfx|PSET]]## : Source pixel values are copied without modification.
##[[KeyPgTransGfx|TRANS]]## : Source pixel values are copied without modification. Does not draw source pixels of mask color. See below.
##[[KeyPgAndGfx|AND]]## : Destination pixels are bitwise ##[[KeyPgOpand|AND]]##ed with source pixels. See below.
##[[KeyPgOrGfx|OR]]## : Destination pixels are bitwise ##[[KeyPgOpor|OR]]##ed with source pixels. See below.
##[[KeyPgXorGfx|XOR]]## : Destination pixels are bitwise ##[[KeyPgOpxor|XOR]]##ed with source pixels. See below.
##[[KeyPgAlphaGfx|ALPHA]]## : Source is blended with a transparency factor specified either in the ##//value//## parameter, or in the image's individual pixels. See below.
##[[KeyPgAddGfx|ADD]]##: Source is multiplied by a value and added with saturation to the destination. See below.
##[[KeyPgCustomgfx|CUSTOM]]## : Uses a user-defined function to perform blending the source with the destination. See below.
The ##**Put**## statement can be used to draw an image onto another image. The ##//x//## and ##//y//## coordinates are affected by the last call to the ##[[KeyPgViewgraphics|View]]## and ##[[KeyPgWindow|Window]]## statements, and plotted image respects the current clipping region set by last call to the ##[[KeyPgViewgraphics|View]]## statement. The source image is clipped if it is drawn outside the destination buffer.
The ##//source//## and ##//target//## image buffers must be valid image buffers. Valid image buffers are created using the ##[[KeyPgGetgraphics|Get]]## or ##[[KeyPgImagecreate|ImageCreate]]## statements. Valid image buffers can be specified in a ##**Put**## statement using an array name with optional index, or a pointer with optional index.
The pixel format of an image buffer must be compatible with the current graphics mode color depth; that is, if you acquire an image using ##[[KeyPgGetgraphics|Get]]## and you later change screen mode via the ##[[KeyPgScreengraphics|Screen]]## statement, the image data may not be valid in the new graphics mode, and you may not be able to draw it on the screen. You should note however that you will always be able to draw image buffers onto other image buffers via ##**Put**## as long as these buffers were created with the same depth.
The ##AND##, ##OR## and ##XOR## methods produce different results depending on the current color depth, as pixels are stored in different formats; see [[GfxInternalFormats|Internal pixel formats]] for details.
The ##TRANS##, ##ALPHA## and ##ADD## methods do not draw pixels in the source image that use the mask color. The mask color depends on target (being it an image buffer or the screen) depth: in depths up to 8 bpp (paletted modes) it is equal to color index ##0##, while in hi/truecolor depths (16 and 32 bpp) it is equal to magenta, which is ##[[KeyPgRgb|RGB]](255, 0, 255)##. Note that in 32 bpp modes the alpha value of a color does not affect the identification of the transparent color; only the lower 24 bits are used to identify it. See [[GfxInternalFormats|Internal pixel formats]] for details.
##[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] //identifier// ( [[KeyPgByval|byval]] //source_pixel// [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]], [[KeyPgByval|byval]] //destination_pixel// [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]], [[KeyPgByval|byval]] //parameter// [[KeyPgAs|as]] [[KeyPgAny|any]] [[KeyPgPtr|ptr]]) [[KeyPgAs|as]] [[KeyPgUinteger|uinteger]]##
##//parameter//## is the parameter that is passed by the ##**Put**## command. It should be a data ##[[KeyPgPtr|Pointer]]##. If omitted, its value will be zero.
- ##[[KeyPgPutfileio|Put (File I/O)]]##
- ##[[KeyPgGetgraphics|Get (Graphics)]]##
- ##[[KeyPgImagecreate|ImageCreate]]##
- ##[[KeyPgAlphaGfx|Alpha]]##
- [[GfxInternalFormats|Internal pixel formats]]
Deletions:
##[[KeyPgPsetGfx PSET]]## : Source pixel values are copied without modification.
##[[KeyPgTransGfx TRANS]]## : Source pixel values are copied without modification. Does not draw source pixels of mask color. See below.
##[[KeyPgAndGfx AND]]## : Destination pixels are bitwise ##[[KeyPgOpand AND]]##ed with source pixels. See below.
##[[KeyPgOrGfx OR]]## : Destination pixels are bitwise ##[[KeyPgOpor OR]]##ed with source pixels. See below.
##[[KeyPgXorGfx XOR]]## : Destination pixels are bitwise ##[[KeyPgOpxor XOR]]##ed with source pixels. See below.
##[[KeyPgAlphaGfx ALPHA]]## : Source is blended with a transparency factor specified either in the ##//value//## parameter, or in the image's individual pixels. See below.
##[[KeyPgAddGfx ADD]]##: Source is multiplied by a value and added with saturation to the destination. See below.
##[[KeyPgCustomgfx CUSTOM]]## : Uses a user-defined function to perform blending the source with the destination. See below.
The ##**Put**## statement can be used to draw an image onto another image. The ##//x//## and ##//y//## coordinates are affected by the last call to the ##[[KeyPgViewgraphics View]]## and ##[[KeyPgWindow Window]]## statements, and plotted image respects the current clipping region set by last call to the ##[[KeyPgViewgraphics View]]## statement. The source image is clipped if it is drawn outside the destination buffer.
The ##//source//## and ##//target//## image buffers must be valid image buffers. Valid image buffers are created using the ##[[KeyPgGetgraphics Get]]## or ##[[KeyPgImagecreate ImageCreate]]## statements. Valid image buffers can be specified in a ##**Put**## statement using an array name with optional index, or a pointer with optional index.
The pixel format of an image buffer must be compatible with the current graphics mode color depth; that is, if you acquire an image using ##[[KeyPgGetgraphics Get]]## and you later change screen mode via the ##[[KeyPgScreengraphics Screen]]## statement, the image data may not be valid in the new graphics mode, and you may not be able to draw it on the screen. You should note however that you will always be able to draw image buffers onto other image buffers via ##**Put**## as long as these buffers were created with the same depth.
The ##AND##, ##OR## and ##XOR## methods produce different results depending on the current color depth, as pixels are stored in different formats; see [[GfxInternalFormats Internal pixel formats]] for details.
The ##TRANS##, ##ALPHA## and ##ADD## methods do not draw pixels in the source image that use the mask color. The mask color depends on target (being it an image buffer or the screen) depth: in depths up to 8 bpp (paletted modes) it is equal to color index ##0##, while in hi/truecolor depths (16 and 32 bpp) it is equal to magenta, which is ##[[KeyPgRgb RGB]](255, 0, 255)##. Note that in 32 bpp modes the alpha value of a color does not affect the identification of the transparent color; only the lower 24 bits are used to identify it. See [[GfxInternalFormats Internal pixel formats]] for details.
##[[KeyPgDeclare declare]] [[KeyPgFunction function]] //identifier// ( [[KeyPgByval byval]] //source_pixel// [[KeyPgAs as]] [[KeyPgUinteger uinteger]], [[KeyPgByval byval]] //destination_pixel// [[KeyPgAs as]] [[KeyPgUinteger uinteger]], [[KeyPgByval byval]] //parameter// [[KeyPgAs as]] [[KeyPgAny any]] [[KeyPgPtr ptr]]) [[KeyPgAs as]] [[KeyPgUinteger uinteger]]##
##//parameter//## is the parameter that is passed by the ##**Put**## command. It should be a data ##[[KeyPgPtr Pointer]]##. If omitted, its value will be zero.
- ##[[KeyPgPutfileio Put (File I/O)]]##
- ##[[KeyPgGetgraphics Get (Graphics)]]##
- ##[[KeyPgImagecreate ImageCreate]]##
- ##[[KeyPgAlphaGfx Alpha]]##
- [[GfxInternalFormats Internal pixel formats]]


Revision [15588]

Edited on 2011-12-29 12:02:21 by CountingPine [Minor formatting/other changes to syntax and parameter info]
Additions:
**Put** [//target//, ] [ [STEP](//x//, //y//), //source// [, (//x1//, //y1//)-[STEP](//x2//, //y2//) ] [, //method// [, ( //alphaval//|//value//|//blender// [, //param//]) ] ]
##[STEP](//x//, //y//)##
specify offsets from the upper-left corner of the destination buffer, or screen, that the image gets drawn to. ##STEP## indicates that ##(//x//, //y//)## offsets are relative to the current graphics cursor position.
##(//x1//, //y1//)-[STEP](//x2//, //y2//)##
##[[KeyPgAndGfx AND]]## : Destination pixels are bitwise ##[[KeyPgOpand AND]]##ed with source pixels. See below.
##[[KeyPgOrGfx OR]]## : Destination pixels are bitwise ##[[KeyPgOpor OR]]##ed with source pixels. See below.
##[[KeyPgXorGfx XOR]]## : Destination pixels are bitwise ##[[KeyPgOpxor XOR]]##ed with source pixels. See below.
Deletions:
**Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-[ STEP ]( //x2//,//y2// ) ] [ ,//method// [ ,( //alphaval//|//value//|//blender// [ ,//param//]) ] ]
##STEP##
indicates that ##(//x//, //y//)## offsets are relative to the current graphics cursor position.
##(//x//, //y//)##
specify offsets from the upper-left corner of the destination buffer, or screen, that the image gets drawn to.
##(//x1//, //y1//)-[ STEP ](//x2//, //y2//)##
##[[KeyPgAndGfx AND]]## : Destination pixels are bitwise ANDed with source pixels. See below.
##[[KeyPgOrGfx OR]]## : Destination pixels are bitwise ORed with source pixels. See below.
##[[KeyPgXorGfx XOR]]## : Destination pixels are bitwise XORed with source pixels. See below.


Revision [14482]

Edited on 2009-08-29 23:33:51 by CountingPine [updated]
Additions:
- ##//target//## is new to ""FreeBASIC""
- The ##TRANS##, ##ALPHA##, ##ADD## and ##CUSTOM## methods are new to ""FreeBASIC""
- FB uses a different image format internally, which is unsupported by QB
- QB throws a run-time error instead of clipping out-of-bounds images
- In QB, only arrays can be specified as source images
Deletions:
- FB uses a different image format internally, which is unsupported by QB.
- The ##TRANS##, ##ALPHA##, ##ADD## and ##CUSTOM## methods are new to ""FreeBASIC"".
- In QB, the destination was always the screen.
- QB throws a run-time error instead of clipping out of bounds images.
- In QB, only arrays can be specified as source images.


Revision [13812]

Edited on 2008-10-24 18:21:57 by CountingPine [FB uses a QB-incompatible format internally]
Additions:
is a ##0..255## value specifying the transparency value for an ##ADD## or ##ALPHA## method blit.
The ##TRANS##, ##ALPHA## and ##ADD## methods do not draw pixels in the source image that use the mask color. The mask color depends on target (being it an image buffer or the screen) depth: in depths up to 8 bpp (paletted modes) it is equal to color index ##0##, while in hi/truecolor depths (16 and 32 bpp) it is equal to magenta, which is ##[[KeyPgRgb RGB]](255, 0, 255)##. Note that in 32 bpp modes the alpha value of a color does not affect the identification of the transparent color; only the lower 24 bits are used to identify it. See [[GfxInternalFormats Internal pixel formats]] for details.
The ##ALPHA## method can be used in two modes. If the ##//value//## parameter is specified, this is used to specify the level of transparency for the whole image to be drawn; a value of 0 will draw a completely transparent image, whereas a value of 255 will draw a completely solid one. This mode works only when drawing onto hi/truecolor targets (16 and 32 bpp).
- FB uses a different image format internally, which is unsupported by QB.
- The ##TRANS##, ##ALPHA##, ##ADD## and ##CUSTOM## methods are new to ""FreeBASIC"".
Deletions:
is a 0-255 value specifying the transparency value for an ##ADD## or ##ALPHA## method blit.
The ##TRANS##, ##ALPHA## and ##ADD## methods do not draw pixels in the source image that use the mask color. The mask color depends on target (being it an image buffer or the screen) depth: in depths up to 8 bpp (paletted modes) it is equal to color index 0, while in hi/truecolor depths (15, 16, 24 and 32 bpp) it is equal to magenta, which is ##[[KeyPgRgb RGB]](255, 0, 255)##. Note that in 24/32 bpp modes the alpha value of a color does not affect the identification of the transparent color; only the lower 24 bits are used to identify it. See [[GfxInternalFormats Internal pixel formats]] for details.
The ##ALPHA## method can be used in two modes. If the ##//value//## parameter is specified, this is used to specify the level of transparency for the whole image to be drawn; a value of 0 will draw a completely transparent image, whereas a value of 255 will draw a completely solid one. This mode works only when drawing onto hi/truecolor targets (15, 16, 24 and 32 bpp).
- The ##TRANS##, ##ALPHA##, ##ADD## and ##CUSTOM## methods are new to FreeBASIC.


Revision [12589]

The oldest known version of this page was created on 2008-02-24 07:51:12 by JeffMarshall [FB uses a QB-incompatible format internally]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode