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/photon/lib_ref/ph/phdccreate.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/photon/lib_ref/ph/phdccreate.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/photon/lib_ref/ph/phdccreate.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/photon/lib_ref/ph/phdccreate.html on line 8

PhDCCreate()

Create and initialize a new draw context

Synopsis:

PhDrawContext_t *PhDCCreate( 
                   int type,
                   long flags,
                   int (*flush)(int Subtype),
                   int (*modify)(PhDrawContext_t *dc,
                                 int acquire,
                                 void *data ) );

Arguments:

type
The type of draw context:
flags
Flags that apply to the context:
flush
The function to be called whenever the current draw buffer needs to be flushed. If not provided, the standard Photon graphic flush function is used.

The Subtype argument is what's passed by PgFFlush().

modify
A function that's called whenever this draw control is to be modified. The modification is restricted by the type of the draw control (e.g. if the type is Ph_DRAW_TO_PRINTER, you can target a different printer but can't target memory with subsequent calls to the modify function).

The arguments are:

Library:

ph

Description:

This function creates a draw context structure and initializes its flush and attach functions. The type argument is recorded in the new draw control and prevents the DC from being used as anything but its current type.


Note: You aren't likely to call this function directly unless you're creating your own type of draw context. The functions that create specific types of contexts (e.g. direct-mode, printer, and memory) call PhDCCreate().

Returns:

A pointer to the newly allocated draw context, or NULL if there isn't enough memory.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PdCreateDirectContext(), PdCreateOffscreenContext(), PhDCSetCurrent(), PhDCGetCurrent(), PhDCRelease(), PmMemCreateMC(), PpCreatePC()


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/photon/lib_ref/ph/phdccreate.html on line 249

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/photon/lib_ref/ph/phdccreate.html on line 249