]> git.tdb.fi Git - libs/gltk.git/blob - source/alignment.cpp
bb5d392b50bd5977c3dc6957548d7fd9f0cccaf2
[libs/gltk.git] / source / alignment.cpp
1 #include <msp/gl/transform.h>
2 #include "alignment.h"
3 #include "geometry.h"
4
5 namespace Msp {
6 namespace GLtk {
7
8 void Alignment::apply(const Geometry &geom, unsigned wd, unsigned ht) const
9 {
10         GL::translate((geom.w-wd)*(x+1)/2, (geom.h-ht)*(y+1)/2, 0);
11 }
12
13 } // namespace GLtk
14 } // namespace Msp