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