Merge branch 'dev' into denoise_speedup
This commit is contained in:
@@ -896,7 +896,7 @@ void OPIcon::drawImage(Cairo::RefPtr<RTSurface> &img,
|
||||
rtengine::Coord tl, br; // Coordinate of the rectangle in the CropBuffer coordinate system
|
||||
drivenPointToRectangle(pos, tl, br, imgW, imgH);
|
||||
|
||||
cr->set_source(img->surface, tl.x, tl.y);
|
||||
cr->set_source(img->get(), tl.x, tl.y);
|
||||
cr->set_line_width(0.);
|
||||
cr->rectangle(tl.x, tl.y, imgW, imgH);
|
||||
cr->fill();
|
||||
|
@@ -205,7 +205,7 @@ void LWButton::redraw (Cairo::RefPtr<Cairo::Context> context)
|
||||
}
|
||||
|
||||
if (icon) {
|
||||
context->set_source (icon->surface, xpos + dilat, ypos + dilat);
|
||||
context->set_source (icon->get(), xpos + dilat, ypos + dilat);
|
||||
context->paint ();
|
||||
}
|
||||
}
|
||||
|
@@ -132,3 +132,8 @@ bool RTSurface::hasSurface() const
|
||||
{
|
||||
return surface ? true : false;
|
||||
}
|
||||
|
||||
const Cairo::RefPtr<Cairo::ImageSurface>& RTSurface::get() const
|
||||
{
|
||||
return surface;
|
||||
}
|
||||
|
@@ -26,12 +26,15 @@
|
||||
*/
|
||||
class RTSurface : public RTScalable
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
static double dpiBack; // used to keep track of master dpi change
|
||||
static int scaleBack; // used to keep track of master scale change
|
||||
Cairo::RefPtr<Cairo::ImageSurface> surface;
|
||||
void changeImage (Glib::ustring imageName);
|
||||
|
||||
public:
|
||||
Cairo::RefPtr<Cairo::ImageSurface> surface;
|
||||
|
||||
RTSurface ();
|
||||
RTSurface (const RTSurface& other);
|
||||
@@ -42,6 +45,8 @@ public:
|
||||
int getHeight() const;
|
||||
bool hasSurface() const;
|
||||
|
||||
const Cairo::RefPtr<Cairo::ImageSurface>& get() const;
|
||||
|
||||
static void init();
|
||||
static void updateImages ();
|
||||
static void setDPInScale (const double newDPI, const int newScale);
|
||||
|
Reference in New Issue
Block a user