flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to rotate image items? |
Author |
|
Overclick 15 Dec 2020, 20:15
Hi
I need to rotate and change angle of some images. Tried to use SetWorldTransform with no success. Please help |
|||
15 Dec 2020, 20:15 |
|
Ali.Z 16 Dec 2020, 03:09
show your code, example from msdn:
https://docs.microsoft.com/en-us/windows/win32/gdi/using-coordinate-spaces-and-transformations p.s. you can do it manually by add/subtracting each x,y coordinates of every vertex. _________________ Asm For Wise Humans |
|||
16 Dec 2020, 03:09 |
|
Ali.Z 16 Dec 2020, 07:26
i found cpp code that does that:
https://www.codeguru.com/cpp/g-m/bitmap/specialeffects/article.php/c1743/Rotate-a-bitmap-image.htm its not perfect, but at least it tells you the steps required or the order of doing .. ~ also searching old help files i found PlgBlt with a description saying it can be used for rotation, but personally i never seen this function. _________________ Asm For Wise Humans |
|||
16 Dec 2020, 07:26 |
|
Overclick 16 Dec 2020, 17:02
Thanks, I'll take a look on it
|
|||
16 Dec 2020, 17:02 |
|
Overclick 18 Dec 2020, 16:49
Looks like there is nothing special. In that scenario I prefer to use own skill by FPU to rotate already preloaded image as I said.
|
|||
18 Dec 2020, 16:49 |
|
donn 18 Dec 2020, 21:25
With just GDI, DrawImage is probably the easies way
DrawImage https://docs.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-rotating-reflecting-and-skewing-images-use SetWorldTransform should work though https://docs.microsoft.com/en-us/windows/win32/gdi/rotation and then Direct2D (D3D, etc..) on top of that. |
|||
18 Dec 2020, 21:25 |
|
Ali.Z 18 Dec 2020, 22:47
DrawImage is GDI+
_________________ Asm For Wise Humans |
|||
18 Dec 2020, 22:47 |
|
Overclick 19 Dec 2020, 14:50
Seems like masm32 accept GDI+ methods (GdipDrawImage). How to call it via Fasm?
|
|||
19 Dec 2020, 14:50 |
|
Ali.Z 19 Dec 2020, 20:53
Code: ; under your resource section library gdiplus,'GDIPLUS.DLL' import gdiplus,\ GdipDrawImage,'GdipDrawImage' then just use invoke or call in your code. _________________ Asm For Wise Humans |
|||
19 Dec 2020, 20:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.