diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-12-03 18:30:32 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2018-12-03 18:30:32 +0000 |
| commit | f82bbc75f157e1901830a2e579dd2968e1ce46a9 (patch) | |
| tree | e907ae1d8071678d1f84cb9df33816e4212cd06c /src | |
| parent | Fix rendering tests (Launchpad bug 1805804). (diff) | |
| download | inkscape-f82bbc75f157e1901830a2e579dd2968e1ce46a9.tar.gz inkscape-f82bbc75f157e1901830a2e579dd2968e1ce46a9.zip | |
Fix failed cast in ColorWheel.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/widget/ink-color-wheel.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ui/widget/ink-color-wheel.cpp b/src/ui/widget/ink-color-wheel.cpp index 09688eca9..db3890548 100644 --- a/src/ui/widget/ink-color-wheel.cpp +++ b/src/ui/widget/ink-color-wheel.cpp @@ -167,19 +167,12 @@ bool ColorWheel::on_draw(const::Cairo::RefPtr<::Cairo::Context>& cr) { Cairo::RefPtr<Cairo::Surface> surface = cr->get_target(); - Cairo::RefPtr<Cairo::ImageSurface> image_surface = - Cairo::RefPtr<Cairo::ImageSurface>::cast_dynamic(surface); - if (!image_surface) { - std::cerr << "ColorWheel::on_draw: Failed Cast!" << std::endl; - return false; - } Gtk::Allocation allocation = get_allocation(); const int width = allocation.get_width(); const int height = allocation.get_height(); - Cairo::Format format = image_surface->get_format(); - const int stride = Cairo::ImageSurface::format_stride_for_width(format, width); + const int stride = Cairo::ImageSurface::format_stride_for_width(Cairo::FORMAT_RGB24, width); int cx = width/2; int cy = height/2; |
