Advertisement
JiiCeii

[PSP/XLP] drawline

Apr 30th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local white = Color.create(255, 255, 255)
  2.  
  3. local line = {pos = {x = 50, y = 50}, width = 100, height = 70}
  4.  
  5. while true do
  6.     g2d.Clear()
  7.  
  8.     g2d.BeginLines() -- on commence le rendu de lignes
  9.         g2d.SetColor(white)
  10.         g2d.SetCoordXY(line.pos.x, line.pos.y)
  11.         g2d.Add() --on ajoute le premier point, ici à 50;50
  12.        
  13.         g2d.SetCoordXYRelative(line.width, line.height)
  14.         g2d.Add() --on ajoute le deuxième point, ici à 50+100;50+70
  15.     g2d.End()
  16.  
  17.     g2d.Flip(g2d.VSYNC)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement