drawRectangle -> drawRect
This commit is contained in:
parent
ff710a24c7
commit
2a35d276de
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Pen.hpp,v 1.2 2005/03/03 09:25:47 cozman Exp $
|
||||
// $Id: Pen.hpp,v 1.3 2005/07/20 03:58:54 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_PEN_HPP
|
||||
#define PHOTON_VIDEO_PEN_HPP
|
||||
@ -103,19 +103,19 @@ public:
|
||||
void drawVector(const math::Point2& point,
|
||||
const math::Vector2& vector) const;
|
||||
|
||||
// Function: drawRectangle
|
||||
// Function: drawRect
|
||||
// Draw an empty rectangle.
|
||||
//
|
||||
// Parameters:
|
||||
// rect - <Rect> to draw.
|
||||
void drawRectangle(const math::Rect &rect) const;
|
||||
void drawRect(const math::Rect &rect) const;
|
||||
|
||||
// Function: fillRectangle
|
||||
// Function: fillRect
|
||||
// Draw a filled rectangle.
|
||||
//
|
||||
// Parameters:
|
||||
// rect - <Rect> to draw.
|
||||
void fillRectangle(const math::Rect &rect) const;
|
||||
void fillRect(const math::Rect &rect) const;
|
||||
|
||||
// Function: drawCircle
|
||||
// Draw an empty circle.
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Pen.cpp,v 1.4 2005/07/18 07:19:48 cozman Exp $
|
||||
// $Id: Pen.cpp,v 1.5 2005/07/20 03:58:54 cozman Exp $
|
||||
|
||||
#include "video/Pen.hpp"
|
||||
|
||||
@ -94,7 +94,7 @@ void Pen::drawVector(const math::Point2& point,
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
void Pen::drawRectangle(const math::Rect &rect) const
|
||||
void Pen::drawRect(const math::Rect &rect) const
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D,0);
|
||||
glPushAttrib(GL_CURRENT_BIT);
|
||||
@ -109,7 +109,7 @@ void Pen::drawRectangle(const math::Rect &rect) const
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
void Pen::fillRectangle(const math::Rect &rect) const
|
||||
void Pen::fillRect(const math::Rect &rect) const
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D,0);
|
||||
glPushAttrib(GL_CURRENT_BIT);
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Pen_test.cpp,v 1.3 2005/07/19 20:55:40 cozman Exp $
|
||||
// $Id: Pen_test.cpp,v 1.4 2005/07/20 03:58:54 cozman Exp $
|
||||
|
||||
#include "photon.hpp"
|
||||
using namespace photon;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
unsigned int i,j; //used throughout demo
|
||||
|
||||
// draw points in a traveling sine curve
|
||||
g.fillRectangle(math::Rect(math::Point2(0,0), 800, 100));
|
||||
g.fillRect(math::Rect(math::Point2(0,0), 800, 100));
|
||||
for(i=0; i < 800; i += 5)
|
||||
{
|
||||
scalar ang = math::degToRad(i+100*app.getTime());
|
||||
@ -75,9 +75,9 @@ public:
|
||||
// draw rectangles to show Rect::calcIntersection in action
|
||||
math::Rect rect1(math::Point2(500, 300), 200, 100);
|
||||
math::Rect rect2(math::Point2(550, 375), 100, 200);
|
||||
r.drawRectangle(rect1);
|
||||
b.drawRectangle(rect2);
|
||||
g.fillRectangle(rect1.calcIntersection(rect2));
|
||||
r.drawRect(rect1);
|
||||
b.drawRect(rect2);
|
||||
g.fillRect(rect1.calcIntersection(rect2));
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user