first commit
This commit is contained in:
96
Lab6/prctngle.cpp
Normal file
96
Lab6/prctngle.cpp
Normal file
@@ -0,0 +1,96 @@
|
||||
//## begin module.cm preserve=no
|
||||
|
||||
// %X% %Q% %Z% %W%
|
||||
|
||||
//## end module.cm
|
||||
|
||||
|
||||
|
||||
//## begin module.cp preserve=no
|
||||
|
||||
//## end module.cp
|
||||
|
||||
|
||||
|
||||
//## Module: Prectangle; Pseudo Package body
|
||||
|
||||
//## Subsystem: Figures
|
||||
|
||||
//## Source file: Prctngle.cpp
|
||||
|
||||
|
||||
|
||||
//## begin module.additionalIncludes preserve=no
|
||||
|
||||
//## end module.additionalIncludes
|
||||
|
||||
|
||||
|
||||
//## begin module.includes preserve=yes
|
||||
|
||||
//## end module.includes
|
||||
|
||||
|
||||
|
||||
// Prectangle
|
||||
|
||||
#include "Prctngle.h"
|
||||
|
||||
//## begin module.additionalDeclarations preserve=yes
|
||||
|
||||
|
||||
|
||||
Persistent* Prectangle::_pobj = Persistent::addType("Prectangle", new Prectangle);
|
||||
|
||||
//## end module.additionalDeclarations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Class Prectangle
|
||||
|
||||
|
||||
|
||||
Prectangle::Prectangle()
|
||||
|
||||
//## begin Prectangle::Prectangle%.hasinit preserve=no
|
||||
|
||||
//## end Prectangle::Prectangle%.hasinit
|
||||
|
||||
//## begin Prectangle::Prectangle%.initialization preserve=yes
|
||||
|
||||
//## end Prectangle::Prectangle%.initialization
|
||||
|
||||
{
|
||||
|
||||
//## begin Prectangle::Prectangle%.body preserve=yes
|
||||
|
||||
//## end Prectangle::Prectangle%.body
|
||||
|
||||
}
|
||||
|
||||
Prectangle::Prectangle(int x1, int y1, int x2, int y2, Color c)
|
||||
|
||||
{
|
||||
|
||||
_pobj=Persistent::addType("Prectangle", new Prectangle);
|
||||
|
||||
setColor(c);
|
||||
|
||||
setLT(x1, y1);
|
||||
|
||||
setRB(x2, y2);
|
||||
|
||||
}
|
||||
|
||||
Prectangle::Prectangle(const Prectangle& src)
|
||||
|
||||
{
|
||||
|
||||
Point *lt, *rb;
|
||||
|
||||
lt=(Point*)&src.getLT();
|
||||
|
||||
setLT(lt->getx(), lt->gety());
|
||||
|
||||
Reference in New Issue
Block a user