Trans2D Graphics Library
Updates
- 2007-1-31: Trans2D has moved to XNA. During the transition it got some improvements and a couple of new samples. A lot has changed and it needs more testing, but the interface is unlikely to change significantly any time soon. You can download it below, please let me know how it's working for you.
- 2006-6-6: No updates for a really long time because of school, but here's the latest version of Trans2D. I've made quite a few improvements to it, please test it out and let me know how everything is working.
- 2005-10-20: Some problems have arisen with the 10/4 build. One of them is a typo in Poly.cs, which somehow got in between when I tested it and when I zipped and uploaded it. The others I'm not so sure about. I would recommend using the the 7/27 build until this gets resolved.
- 2005-10-4: Fixed a problem where texels did not map to pixels neatly. Previous versions handled this inelegantly by applying a half-pixel translation matrix in calls to the protected Transform.Draw overload, but this causes problems with things like text that don't require the shift. Tim Misiak sent me a far more elegant method, so now the Poly and Quad classes apply the shift in their vertices' texture coordinates, and the protected Transform.Draw method is passed Matrix.Identity. For more details, please see the readme. Also, I recreated the documentation using NDoc (see http://ndoc.sourceforge.net), it's much cleaner and more searchable now.
- 2005-7-27: Tiny update to address an issue that came up with one of the point transformation methods. If you downloaded the 7/23 release, please upgrade to this one. Sorry for the inconvenience.
- 2005-7-23: New version online. Not a lot of changes, but there is a critical fix to the Quad and SubTex classes. I've also exported the documentation to HTML, it now comes with the download. The only issue is that I could only view it in IE and had to fiddle with the security settings since it uses ActiveX, which seems completely unncessary to me since Javadocs got along okay just fine without it. If anyone knows a better way to do this, please clue me in.
Overview
Trans2D is a lightweight open source graphics library that uses C# and XNA (previously, Managed Direct3D). It is built on a hierarchical model in which each sprite has its own transformed space. Here are some of its features:
- Easily transformable sprites - they can be positioned, scaled, rotated, tinted, and faded
- Hierarchical transformations allow you to put one sprite inside of another, which simplifies modelling complicated objects and makes layering easy
- Provides utility classes for easy resource management
- Bitmap text, including a content pipeline extension for adding bitmap fonts to your project
- Offers vertex caching for fast rendering
- Lots of sample applications (see screenshots)
It's a useful library because it takes care of the often unpleasant chores of rendering 2D graphics without getting in the way. The source is small and well-documented so you can tweak it yourself.
Downloads
- Trans2D
- Sample apps for old Trans2D builds
Development
My current goals for Trans2D are to get it running on the xbox, improve its performance through profiling, and build additional libraries on top of it to provide standardized UI, physics, and other widely used functionality.
Contact
If you have questions or suggestions about Trans2D:
Screens




Last update 2006-01-31