Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 8
Choose a format
#include <gf/gf.h>
unsigned gf_layer_choose_format (
gf_layer_t layer,
gf_format_t format[],
size_t nformat,
const unsigned * criteria );
- layer
- The handle for the layer, returned by gf_layer_attach().
- format
- An array of gf_format_t that the function fills with the formats that the layer supports and that satisfy the specified criteria.
- nformat
- The size of format array. No more than nformat formats will be returned.
- criteria
- A list of criteria to facilitate the selection of appropriate formats. The list takes the form of an array of unsigned values and is interpreted as a list of key/value pairs. The list must be terminated with a key of GF_NONE (no value needs to be specified). The valid manifests for keys and their corresponding values include:
- GF_2D_RENDERABLE — choose formats based on whether or not they can be rendered to using the 2D engine. The value can be either:
- GF_TRUE — choose formats that can be rendered to using the 2D engine.
- GF_FALSE — choose formats that cannot be rendered to using the 2D engine.
- GF_RED_SIZE — choose formats that support at least “value” bits of red per pixel.
- GF_GREEN_SIZE — choose formats that support at least “value” bits of green per pixel.
- GF_BLUE_SIZE — choose formats that support at least “value” bits of blue per pixel.
- GF_ALPHA_SIZE — choose formats that support at least “value” bits of alpha per pixel.
gf
This function chooses a format based on a layer's capabilities and application requirements.
The number of formats that satisfied the criteria and were placed into the formats array. A 0 means that the layer does not support any formats that satisfy all the specified criteria.
QNX Graphics Framework
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
gf_format_t,
gf_layer_attach()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 142
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_layer_choose_format.html on line 142