-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
144 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[](../header.md ':include') | ||
|
||
# cf_canvas_blit | ||
|
||
Category: [graphics](/api_reference?id=graphics) | ||
GitHub: [cute_graphics.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_graphics.h) | ||
--- | ||
|
||
Blits one canvas onto another. | ||
|
||
```cpp | ||
void cf_canvas_blit(CF_Canvas src, CF_V2 u0, CF_V2 v0, CF_Canvas dst, CF_V2 u1, CF_V2 v1); | ||
``` | ||
Parameters | Description | ||
--- | --- | ||
src | The source texture to copy pixels from. | ||
u0 | The normalized coordinate of the top-left of the source rect. | ||
v0 | The normalized coordinate of the bottom-right of the source rect. | ||
src | The canvas where pixels are copied from. | ||
u1 | The normalized coordinate of the top-left of the destination rect. | ||
v1 | The normalized coordinate of the bottom-right of the destination rect. | ||
dst | The destination canvas where pixels are copied to. | ||
## Remarks | ||
The texture formats of the underlying canvas's must be PIXELFORMAT_DEFAULT. Each u/v coordinate | ||
is normalized, meaning a number from 0 to 1. This lets the function operate on canvas's of any | ||
size. To convert a coordinate to a normalized coordinate, simply divide the x/y of your coordinate | ||
by the width/height of the canvas. | ||
## Related Pages | ||
[CF_Canvas](/graphics/cf_canvas.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.