Created
February 16, 2019 03:16
-
-
Save redj/5cbc36dc453c4f737aaf6a3c599ad271 to your computer and use it in GitHub Desktop.
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
picMutex.Release(); | |
#if defined(USE_IMAGE_READER) | |
if(bitmap) | |
{ | |
#if defined(USE_IMAGE_READER) | |
Size imgSize = { bitmap.width, bitmap.height }; | |
#else | |
Size imgSize = { width, height }; | |
#endif | |
// surface.Stretch(bitmap, 0,0, 0,0, size.w, size.h, bitmap.width, bitmap.height); | |
float sx = 0, sy = 0, sw = imgSize.w, sh = imgSize.h; | |
float dx = 0, dy = 0, w = size.w, h = size.h; | |
Pointf texCoords[4] = | |
{ | |
{ (sx) / imgSize.w, (sy) / imgSize.h }, | |
{ (sx+sw)/ imgSize.w, (sy) / imgSize.h }, | |
{ (sx+sw)/ imgSize.w, (sy+sh)/ imgSize.h }, | |
{ (sx) / imgSize.w, (sy+sh)/ imgSize.h } | |
}; | |
int i = 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment