Skip to content

Help with ProtonSDK's Surface and SurfaceAnim components #32

Answered by SethRobinson
rainerhagert asked this question in Q&A
Discussion options

You must be logged in to vote

Sure,

Hmm, you're right, there is really no documentation on this. A surface loads a graphics, and allows you to do 2d blits to the screen easily.

SurfaceAnim subclasses Surface and adds a few extra things for animations and blitting, so you pretty much want to always use that.

The RTBareBones example shows a Surface being loaded and blitted - a lot of the code is commented out, but it shows valid examples of different ways to "blit" it to the screen.

If you look through the SurfaceAnim header, you can see a lot of different Blit functions, some let you tint the image with colors, or rotate it around a specific point.

//you need to load a graphic.  Depending on what Proton has enabled, it…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rainerhagert
Comment options

@SethRobinson
Comment options

@rainerhagert
Comment options

Answer selected by rainerhagert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants