Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i = 1;i<100;i+=2) {
- // calculate our extents
- srect16 r(i*(lcd.dimensions().width/100.0),
- i*(lcd.dimensions().height/100.0),
- lcd.dimensions().width-i*(lcd.dimensions().width/100.0)-1,
- lcd.dimensions().height-i*(lcd.dimensions().height/100.0)-1);
- // draw the four lines
- draw::line(lcd,srect16(0,r.y1,r.x1,lcd.dimensions().height-1),lcd_color::light_blue);
- draw::line(lcd,srect16(r.x2,0,lcd.dimensions().width-1,r.y2),lcd_color::hot_pink);
- draw::line(lcd,srect16(0,r.y2,r.x1,0),lcd_color::pale_green);
- draw::line(lcd,srect16(lcd.dimensions().width-1,r.y1,r.x2,lcd.dimensions().height-1),lcd_color::yellow);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement