This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
It's hard to understand your code as I have no idea what the GCompound class is. Also please don't use all upper case letters for variables, they are only for constants ie those declared as final static.
If you are successfully generating a right angle triangle then your problem is when you draw the next row your offset is wrong. You need to offset each new rows start position by half the width of a single brick. This is because each row has one less brick than the row below it, so to centre a row relative to the previous one you need to take off half a brick width at each end .
Joined: Feb 01, 2012
Thanks for the suggestion will try to do that.
The GCompound is part of acm package that belongs to GObject .