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); }
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); }
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); }
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 ; }
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; }
// 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; }
// 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 ; }
void wxQtDCImpl::DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) { DoDrawBitmap( icon, x, y, true ); }
void wxGTKCairoDCImpl::DoDrawIcon(const wxIcon& icon, int x, int y) { DoDrawBitmap(icon, x, y, true); }
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); }