void ddAbstractFigure::basicDrawSelected(wxBufferedDC& context, ddDrawingView *view){
	ddRect copy = displayBox();
	view->CalcScrolledPosition(copy.x,copy.y,&copy.x,&copy.y);
	
	context.SetPen(*wxRED_PEN);
	context.SetBrush(wxBrush (wxColour(133, 133, 133),wxSOLID));
	context.DrawRectangle(copy);
}
Esempio n. 2
0
void TangramDlg::PaintTans(wxBufferedDC& dc){
    for(int i=0;i<TANS_NO;i++){
        if(tans[i] != NULL) {
            dc.SetPen(wxPen(wxColour(0,0,0), 3 ));
            dc.SetBrush(wxBrush(wxColour(255*i/8,50,25)));
            dc.DrawPolygon(tans[i]->GetSize(),tans[i]->GetPoints());
        }
    }     
}
Esempio n. 3
0
void hdAbstractFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view)
{
	hdRect copy = displayBox().gethdRect(view->getIdx());
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);

	context.SetPen(*wxGREEN_PEN);
	context.SetBrush(wxBrush (wxColour(208, 208, 208), wxSOLID));
	context.DrawRectangle(copy);
}
Esempio n. 4
0
void hdPolyLineFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view)
{
	int posIdx = view->getIdx();
	if(points[posIdx]->count() < 2)
	{
		return;
	}
	hdPoint start, end;

	if(startTerminal)
	{
		startTerminal->setLinePen(linePen);
		start = startTerminal->draw(context, getStartPoint(posIdx), pointAt(posIdx, 1), view);
	}
	else
	{
		start = getStartPoint(posIdx);
	}

	if(endTerminal)
	{
		endTerminal->setLinePen(linePen);
		end = endTerminal->draw(context, getEndPoint(posIdx), pointAt(posIdx, pointCount(posIdx) - 2), view);
	}
	else
	{
		end = getEndPoint(posIdx);
	}

	context.SetPen(linePen);
	for(int i = 0; i < points[posIdx]->count() - 1; i++)
	{
		hdPoint *p1 = (hdPoint *) points[posIdx]->getItemAt(i);
		hdPoint *p2 = (hdPoint *) points[posIdx]->getItemAt(i + 1);

		hdPoint copyP1 = hdPoint (*p1);
		view->CalcScrolledPosition(copyP1.x, copyP1.y, &copyP1.x, &copyP1.y);
		hdPoint copyP2 = hdPoint (*p2);
		view->CalcScrolledPosition(copyP2.x, copyP2.y, &copyP2.x, &copyP2.y);

		context.DrawLine(copyP1, copyP2);
	}
}
Esempio n. 5
0
void hdLineAttribute::apply(wxBufferedDC &context)
{
	context.SetPen(penAttributes);
}
void ddIFigure::drawSelected (wxBufferedDC& context, ddDrawingView *view){
	context.SetPen(defaultSelectedPen);
	context.SetBrush(defaultSelectedBrush);
}