I've done some more changes to the API now. I've added a "QuadList" tool class which is a bit like the Ogre ManualObject, where you can quickly build up something just using simple functions to draw quads, borders, sprites and even glyphs anywhere you like.
The biggest change so far is that I've combined the Canvas, SpriteLayer and Text classes into one; called Layer now. So it's more easier to understand and use.
Code: Select all
// Create Silverback and load in dejavu
mSilverback = new Gorilla::Silverback();
mSilverback->loadAtlas("dejavu");
mScreen = mSilverback->createScreen(mViewport, "dejavu");
// Create our drawing layer
mLayer = mScreen->createLayer(0);
// Create a rectangle with a pink border and no background.
rect = mLayer->createRectangle(10,10,500,100);
rect->border(5, Gorilla::Colours::Pink);
rect->no_background();
// Create a closed line loop.
list = mLayer->createLineList();
list->begin();
list->position(100,100);
list->position(100,200);
list->position(50,200);
list->end(true);
// Create a polygon with coco as the background and a OrangeRed border
poly = mLayer->createPolygon(250,250, 250, 8);
poly->background_image("coco");
poly->border_width(12);
poly->border_colour(Gorilla::Colours::OrangeRed);
// Create a QuadList with various bits in it.
quads = mLayer->createQuadList();
quads->begin();
quads->gradient(100,100, 300,300, Gorilla::Gradient_NorthSouth, Gorilla::Colours::Aqua, Gorilla::Colours::Red);
quads->border(100,100, 300,300, 10,Gorilla::Colours::Pink, Gorilla::Colours::Red, Gorilla::Colours::Blue, Gorilla::Colours::Green);
quads->glyph(100,100, 'A', Gorilla::Colours::BlueViolet);
quads->end();
I was going to release this today, but I there are still some bits need to be finished and I want to rewrite the documentation to include all of these changes. So I'm going to aim for Monday instead.