Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
hunglapki
hunglapki's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
How to layer drawing on the top...Plz help!!!!!!
[4 Replies]
21-Oct-2012 02:18 AM
Forum:
Programming Questions
Hi,
I have a problem doing a hero drawing over a 2D pattern which generates by a single pattern unit...
It would be a huge huge huge favour if anyone could help me, Thank you!!!!!
//draw my hero
void drawDoraemon()
{
Draw Hero code here
}
//draw pme unit of a pattern
//and position it according to x and y parameters
//draw surprising pattern
void drawPatternUnit(int xxx, int yyy)
{
pushMatrix();//isolates transformations in memory
//transformations happen in reverse
translate(xxx, yyy);//move the Pattern by this much
Pattern drawing code here
popMatrix();//done isolating memory
}
void drawSuprisingPattern()
{
//draw pattern unit horizontal line down many times
for(int j=0; j < 4; j++)
{
//code we want repeated
//entire horz line of units
//draw pattern unit across this many times
for(int i=0; i < 4; i++)
{
//code we want repeated
drawPatternUnit(i*100 , j*100);
}
}
}
So it's basically what I have got so far...
I know I've miss something to make my hero drawing to be overlaying the pattern drawing.
«Prev
Next »
Moderate user : hunglapki
Forum