Ejemplo n.º 1
0
void wxMotifDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
{
    wxCHECK_RET( IsOk(), "invalid dc" );
    wxCHECK_RET( icon.IsOk(), "invalid icon" );

    DoDrawBitmap(icon, x, y, true);
}
Ejemplo n.º 2
0
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
{
    wxCHECK_RET( Ok(), "invalid dc" );
    wxCHECK_RET( icon.Ok(), "invalid icon" );

    DoDrawBitmap(icon, x, y, true);
}
Ejemplo n.º 3
0
void wxSVGFileDCImpl::DoDrawIcon(const class wxIcon & myIcon, wxCoord x, wxCoord y)
{
    wxBitmap myBitmap (myIcon.GetWidth(), myIcon.GetHeight() );
    wxMemoryDC memDC;
    memDC.SelectObject( myBitmap );
    memDC.DrawIcon(myIcon,0,0);
    memDC.SelectObject( wxNullBitmap );
    DoDrawBitmap(myBitmap, x, y);
}
Ejemplo n.º 4
0
void wxSVGFileDC::DoDrawIcon(const class wxIcon & myIcon, wxCoord x, wxCoord y)
{
    wxBitmap myBitmap (myIcon.GetWidth(), myIcon.GetHeight() ) ;
    wxMemoryDC memDC;
    memDC.SelectObject( myBitmap );
    memDC.DrawIcon(myIcon,0,0);
    memDC.SelectObject( wxNullBitmap );
    DoDrawBitmap(myBitmap, x, y);
    wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoDrawIcon Call executed")) ;
    return ;
}
Ejemplo n.º 5
0
bool osm_pi::RenderOverlay(wxDC &dc, PlugIn_ViewPort *vp)
{
    m_pdc = &dc;
    if(m_bShowOsm)
    {
        double x1 = m_pastVp.lon_min;
        double y1 = m_pastVp.lat_min;
        double x2 = m_pastVp.lon_max;
        double y2 = m_pastVp.lat_max;
        // TODO: Query local database for seamarks
        std::vector<Poi> seamarks;
        m_pOsmDb->SelectNodes(x1,y1,x2,y2,seamarks);

        for(std::vector<Poi>::iterator it = seamarks.begin(); it != seamarks.end(); ++it) {
            wxPoint pl;
            double lat = (*it).latitude;
            double lon = (*it).longitude;
            GetCanvasPixLL(vp, &pl, lon, lat);
            //wxLogMessage (_T("OSM_PI: Vector %i @ latlon[%f,%f] xy[%i,%i]"),(*it).id,lat,lon,pl.x,pl.y);
            DoDrawBitmap( *_img_osm, pl.x, pl.y, false );
            /*
            if(m_pdc && m_pdc->IsOk())
            {     
                m_pdc->SetPen(*wxBLACK_PEN);
                m_pdc->SetBrush(*wxTRANSPARENT_BRUSH);
            }

            if(m_pdc && m_pdc->IsOk())
            {
                m_pdc->DrawCircle(pl.x, pl.y,10);
                wxLogMessage (_T("OSM_PI: DrawCircle"));
            }*/
        }
        return true;
    }
    else
        return false;
    
//    if (!b_dbUsable || !m_bRenderOverlay)
//       return false;

}
Ejemplo n.º 6
0
// export a bitmap as a raster image in png
bool wxSVGFileDCImpl::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
                             wxDC* source, wxCoord xsrc, wxCoord ysrc,
                             wxRasterOperationMode logicalFunc /*= wxCOPY*/, bool useMask /*= false*/,
                             wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/)
{
    if (logicalFunc != wxCOPY)
    {
        wxASSERT_MSG(false, wxT("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible"));
        return false;
    }
    if (useMask != false)
    {
        wxASSERT_MSG(false, wxT("wxSVGFileDC::DoBlit Call requested false mask; this is not possible"));
        return false;
    }
    wxBitmap myBitmap (width, height);
    wxMemoryDC memDC;
    memDC.SelectObject( myBitmap );
    memDC.Blit(0, 0, width, height, source, xsrc, ysrc);
    memDC.SelectObject( wxNullBitmap );
    DoDrawBitmap(myBitmap, xdest, ydest);
    return false;
}
Ejemplo n.º 7
0
// export a bitmap as a raster image in png
bool wxSVGFileDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
                         wxDC* source, wxCoord xsrc, wxCoord ysrc,
                         int logicalFunc /*= wxCOPY*/, bool useMask /*= FALSE*/,
                         wxCoord /*xsrcMask = -1*/, wxCoord /*ysrcMask = -1*/)
{
    if (logicalFunc != wxCOPY)
    {
        wxASSERT_MSG(FALSE, wxT("wxSVGFileDC::DoBlit Call requested nonCopy mode; this is not possible")) ;
        return FALSE ;
    }
    if (useMask != FALSE)
    {
        wxASSERT_MSG(FALSE, wxT("wxSVGFileDC::DoBlit Call requested False mask ; this is not possible")) ;
        return FALSE ;
    }
    wxBitmap myBitmap (width, height) ;
    wxMemoryDC memDC;
    memDC.SelectObject( myBitmap );
    memDC.Blit(0, 0, width, height, source, xsrc, ysrc);
    memDC.SelectObject( wxNullBitmap );
    DoDrawBitmap(myBitmap, xdest, ydest);
    wxASSERT_MSG(!wxSVG_DEBUG, wxT("wxSVGFileDC::DoBlit Call executed")) ;
    return FALSE ;
}
Ejemplo n.º 8
0
void wxQtDCImpl::DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
{
    DoDrawBitmap( icon, x, y, true );
}
Ejemplo n.º 9
0
void wxGTKCairoDCImpl::DoDrawIcon(const wxIcon& icon, int x, int y)
{
    DoDrawBitmap(icon, x, y, true);
}
Ejemplo n.º 10
0
Archivo: dc.cpp Proyecto: hgwells/tive
void wxDC::DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
{
    // VZ: egcs 1.0.3 refuses to compile this without cast, no idea why
    DoDrawBitmap((const wxBitmap&)icon, x, y, true);
}