Advertisement

Common 2D Drawing Functions

Started by October 19, 2004 01:02 PM
-1 comments, last by Stru 19 years, 10 months ago
I am writing all the drawing functions for my graphics engine for doing 2D graphics in Direct3D with textured quads, and I am trying to come up with a bunch of commonly used or very useful drawing functions in 2D games These are what I have programmed so far. Draw (lets the user locate each vertex of the quad) DrawSquare (Draw a square with a x,y,size,angle) DrawRectangle (Draw a rectangle with left/top/right/bottom) DrawLine (Draws a line between 2 points with a specified thickness) DrawIsoFloor (Draw an isometric floor tile of a certain size) DrawIsoWallLeft (Draw an isometric left side wall tile of a certain size and height) DrawIsoWallRight (Draw an isometric right side wall tile of a certain size and height) Are there any other commonly used functions I am forgetting? And also is there a standard isometric ratio (I am sure I learned about this in High school but I've forgotten) right now I am using a slope of 2 for the isometric lines. Is that the standard? Would it be better to let the user set the ratio?

This topic is closed to new replies.

Advertisement