gf_draw_blitscaled()

Perform a scaled blit

Synopsis:

#include <gf/gf.h>

int gf_draw_blitscaled( gf_context_t context,
                        gf_surface_t ssurface,
                        gf_surface_t dsurface,
                        int sx1,
                        int sy1,
                        int sx2,
                        int sy2,
                        int dx1,
                        int dy1,
                        int dx2,
                        int dy2 );

Arguments:

context
The handle for draw context.
ssurface
The surface to copy from (source surface). If NULL, the context's currently targeted surface is used.
dsurface
The surface to copy to (destination surface). This surface can not be the same as ssurface. If NULL, the context's currently targeted surface is used.
sx1, sy1, sx2, sy2
The coordinates of the source area to blit from. The coordinates sx1,sy1 are the upper-left corner, and sx2,sy2 are the lower-right.
dx1, dy1, dx2, dy2
The coordinates of the destination area to blit to. This area may be larger or smaller than the source area — the blitted pixels are scaled accordingly.

Library:

gf

Description:

This function copies the rectangle defined by the source coordinates, from a source surface to a destination surface, scaling the source rectangle as necessary to fit the destination coordinates. The source and destination can not be the same surface.


Note: If you are blitting on the same surface (that is, ssurface and dsurface point to the same surface), the source and destination rectangles can't overlap. If they do, the results are unpredictable.

Returns:

GF_ERR_OK
Success.
GF_ERR_PARM
Invalid source or destination rectangle.
GF_ERR_NOLOCK
The hardware isn't locked; check to ensure gf_draw_begin() was called successfully.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_draw_blit1(), gf_draw_blit2()