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);
}
示例#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());
        }
    }     
}
示例#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);
}
示例#4
0
void Hole::draw ( wxBufferedDC& dc ) {
	dc.SetBrush( wxBrush( *wxBLACK ) );
	#if NATIVEZOOMING
	double z = 1.0;
	#else
	double z = Billiard::zoom;
	#endif
	
	dc.DrawCircle( pos.x * z, pos.y * z, HOLE * z );
}
示例#5
0
void Ball::draw ( wxBufferedDC& dc ) {
	wxSize size ( dc.GetTextExtent( n ) );
	
	#if NATIVEZOOMING
	double z = 1.0;
	#else
	double z = Billiard::zoom;
	#endif
	
	dc.SetBrush( wxBrush( color ) );
	//cout << "Disegno la pallina numero " << balls[i].num << ".\n";
	
	dc.DrawCircle ( pos.x * z, pos.y * z, RADIUS * z );
	
	if ( num ) {
		dc.SetBrush( wxBrush( *wxWHITE ) );
		dc.DrawCircle ( pos.x * z, pos.y * z, INNER * z );
		dc.DrawText ( n, pos.x * z - 0.5 * size.GetWidth(), pos.y * z - 0.5 * size.GetHeight() );
	}
}
示例#6
0
void Side::draw ( wxBufferedDC& dc ) {
	#if NATIVEZOOMING
	double z = 1.0;
	#else
	double z = Billiard::zoom;
	#endif
	
	dc.SetBrush( wxBrush( *wxWHITE ) );
	
	dc.DrawRoundedRectangle( ( beg.x - ( !type ? RADIUS : 0.0 ) ) * z, 
				 ( beg.y - ( type ? RADIUS : 0.0 ) ) * z, 
				 ( !type ? end.x - beg.x + 2.0 * RADIUS : dir * 100.0 ) * z,
				 ( type ? end.y - beg.y + 2.0 * RADIUS : dir * 100.0 ) * z, RADIUS * z );
	
}
示例#7
0
void ddScrollBarHandle::draw(wxBufferedDC &context, hdDrawingView *view)
{
	int idx = view->getIdx();
	context.SetBrush(*wxWHITE_BRUSH);
	wxPoint copy = getDisplayBox(idx).GetPosition();
	view->CalcScrolledPosition(copy.x, copy.y, &copy.x, &copy.y);
	context.DrawRectangle(copy.x, copy.y, getDisplayBox(idx).width, getDisplayBox(idx).height);
	context.DrawBitmap(upBitmap, copy.x + 1, copy.y + 2, true);
	context.DrawBitmap(downBitmap, copy.x + 1, copy.y + getDisplayBox(idx).height - 2 - downBitmap.GetHeight(), true);

	barSize.SetHeight((getDisplayBox(idx).height - 12) * 0.45);
	barSize.SetWidth(getDisplayBox(idx).width - 4);

	int divBy = (table->getTotalColumns() - table->getColumnsWindow());
	if(divBy <= 0)
		divBy = table->getColumnsWindow();
	int colOffset = barSize.GetHeight() / divBy;
	int verticalPosBar = 3 + copy.y + downBitmap.GetHeight() + colOffset * table->getTopColWindowIndex();
	if(table->getColumnsWindow() > 1)
		context.DrawRectangle(wxPoint(copy.x + 2, verticalPosBar), barSize);

}
示例#8
0
void hdFillAttribute::apply(wxBufferedDC &context)
{
	context.SetBrush(fillAttributes);
}
void ddIFigure::drawSelected (wxBufferedDC& context, ddDrawingView *view){
	context.SetPen(defaultSelectedPen);
	context.SetBrush(defaultSelectedBrush);
}