flat assembler
Message board for the users of flat assembler.

Index > Windows > Direct2D how set sprite size to screen resolution ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1766
Roman 24 Aug 2019, 09:58
I use Win 7 Direct2D(without Directx SwapChain) for draw sprites\images. For draw my GUI.

My screen resolution 1680x1050

But if i draw in 1024x768 resolution my sprites\images draw behind the screen


How i think do:
Code:
myX = DeskResX/1680
myY = DeskResY/1050

SpriteX2DCoord = 1200
SpriteY2DCoord = 900

SpriteX2DCoord = SpriteX2DCoord*myX
SpriteY2DCoord = SpriteY2DCoord*myY

    


How its correct ?
I will be glad to hear your opinion.
Post 24 Aug 2019, 09:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.