Skip to content

Commit

Permalink
Add rectangle test tool/example
Browse files Browse the repository at this point in the history
  • Loading branch information
marcan committed Oct 7, 2011
1 parent e040adc commit 8242115
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/rect.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# OpenLase - a realtime laser graphics toolkit
#
# Copyright (C) 2009-2011 Hector Martin "marcan" <hector@marcansoft.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 or version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

import pylase as ol
from math import pi

ol.init()

while True:
ol.loadIdentity()
ol.scale((0.999, 0.999))
ol.rect((-1,-1),(1,1),ol.C_WHITE)
ol.renderFrame(100)

0 comments on commit 8242115

Please sign in to comment.