예제 #1
0
wxRect FenetreZoom::RepereImageEcran(wxRect &r)
{
    wxPoint	p1Img(r.GetLeftTop()),p2Img(r.GetBottomRight());
    wxPoint	p1=RepereImageEcran(p1Img);
    wxPoint	p2=RepereImageEcran(p2Img);
    return wxRect(p1,p2);
}
예제 #2
0
wxRect FenetreZoom::RepereEcranImage(wxRect &r)
{
    wxPoint	p1(r.GetLeftTop()),p2(r.GetBottomRight());
    wxPoint	p1Img=RepereEcranImage(p1);
    wxPoint	p2Img=RepereEcranImage(p2);
    return wxRect(p1Img,p2Img);
}
예제 #3
0
FenetreZoom::FenetreZoom(FenetrePrincipale	*f,wxRect &r)
    : wxFrame(NULL, wxID_ANY, _T("Zoom") , r.GetLeftTop(),r.GetSize())
{
    fMere = f;
    facteurZoom=2;
    zoomInactif=false;
}
예제 #4
0
void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect,
                                  const wxColour& initialColour,
                                  const wxColour& destColour,
                                  wxDirection nDirection )
{
    wxPoint start;
    wxPoint end;
    switch( nDirection)
    {
    case wxWEST :
        start = rect.GetRightBottom();
        start.x++;
        end = rect.GetLeftBottom();
        break;
    case wxEAST :
        start = rect.GetLeftBottom();
        end = rect.GetRightBottom();
        end.x++;
        break;
    case wxNORTH :
        start = rect.GetLeftBottom();
        start.y++;
        end = rect.GetLeftTop();
        break;
    case wxSOUTH :
        start = rect.GetLeftTop();
        end = rect.GetLeftBottom();
        end.y++;
        break;
    default :
        break;
    }

    if (rect.width == 0 || rect.height == 0)
        return;

    m_graphicContext->SetBrush( m_graphicContext->CreateLinearGradientBrush(
        start.x,start.y,end.x,end.y, initialColour, destColour));
    m_graphicContext->SetPen(*wxTRANSPARENT_PEN);
    m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height);
    m_graphicContext->SetPen(m_pen);
    m_graphicContext->SetBrush(m_brush);

    CalcBoundingBox(rect.x, rect.y);
    CalcBoundingBox(rect.x + rect.width, rect.y + rect.height);
}
예제 #5
0
// Converts a wxRect into a comma-delimited string!
// Example: 32,64,128,5
wxString ToString( const wxRect& src, const wxString& separator )
{
	return ToString( src.GetLeftTop(), separator ) << separator << ToString( src.GetSize(), separator );
}