- code.zip
- Libs
- LTypes
- Programs
- CompVisit
- ReferableTest
|
// CompVisit.cpp
//
#include "stdafx.h"
#include "LTypes/RefCnt.h"
#include "shapes.h"
using namespace GE_;
int _tmain(int argc, _TCHAR* argv[])
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
STRACE(trc, 1, ("Begin test\n"))
//create a drawing
NApp::CGroup::Ptr pDrawing;
pDrawing.New();
//add in it teo circles
new NApp::CCircle(pDrawing, NApp::SRect(10,10,60,60));
new NApp::CCircle(pDrawing, NApp::SRect(80,10,140,60), 0, 7);
//create a subgroup
NApp::CGroup* pSubDraw = new NApp::CGroup;
pSubDraw->SetParent(pDrawing); //palce it into the drawing
pSubDraw->SetAttribute(NApp::CGroup::attr_linecolor, 4);
//add two rectangles in the subgroup
new NApp::CRectangle(pSubDraw, NApp::SRect(20,70,130,120));
new NApp::CRectangle(pSubDraw, NApp::SRect(20,125,130,150), 5);
NApp::CDrawer::Ptr pDrw; pDrw.New();
pDrawing->Draw(pDrw);
std::cout << "\nPress any key ...\n";
while(!getch());
trc("End Program\n");
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.