Scroom  0.14
cairo-helpers.hh
Go to the documentation of this file.
1 /*
2  * Scroom - Generic viewer for 2D data
3  * Copyright (C) 2009-2022 Kees-Jan Dijkzeul
4  *
5  * SPDX-License-Identifier: LGPL-2.1
6  */
7 
8 #pragma once
9 
10 #include <list>
11 
12 #include <gdk/gdk.h>
13 
14 #include <cairo.h>
15 
16 #include <scroom/color.hh>
17 #include <scroom/rectangle.hh>
18 
19 namespace Colors
20 {
21  extern const Color OUT_OF_BOUNDS;
22 }
23 
24 void traceRectangleContour(cairo_t* cr, Scroom::Utils::Rectangle<double> const& viewArea);
25 void drawRectangleContour(cairo_t* cr, Scroom::Utils::Rectangle<double> const& viewArea);
26 void drawRectangleContour(cairo_t* cr, Color const& c, Scroom::Utils::Rectangle<double> const& viewArea);
27 void setClip(cairo_t* cr, double x, double y, double width, double height);
28 void setClip(cairo_t* cr, const Scroom::Utils::Rectangle<double>& area);
29 void drawRectangle(cairo_t* cr, Color const& c, Scroom::Utils::Rectangle<double> const& viewArea);
30 void drawOutOfBoundsWithBackground(cairo_t* cr,
31  Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
32  Scroom::Utils::Rectangle<double> const& actualPresentationArea,
33  double pixelSize);
34 void drawOutOfBoundsWithBackgroundColor(cairo_t* cr,
35  const Color& background,
36  Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
37  Scroom::Utils::Rectangle<double> const& actualPresentationArea,
38  double pixelSize);
39 void drawOutOfBoundsWithoutBackground(cairo_t* cr,
40  Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
41  Scroom::Utils::Rectangle<double> const& actualPresentationArea,
42  double pixelSize);
43 double pixelSizeFromZoom(int zoom);
traceRectangleContour
void traceRectangleContour(cairo_t *cr, Scroom::Utils::Rectangle< double > const &viewArea)
Definition: cairo-helpers.cc:22
Colors::OUT_OF_BOUNDS
const Color OUT_OF_BOUNDS
drawOutOfBoundsWithBackgroundColor
void drawOutOfBoundsWithBackgroundColor(cairo_t *cr, const Color &background, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition: cairo-helpers.cc:83
drawOutOfBoundsWithBackground
void drawOutOfBoundsWithBackground(cairo_t *cr, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition: cairo-helpers.cc:74
drawRectangle
void drawRectangle(cairo_t *cr, Color const &c, Scroom::Utils::Rectangle< double > const &viewArea)
Definition: cairo-helpers.cc:62
color.hh
Colors
Definition: cairo-helpers.hh:19
drawOutOfBoundsWithoutBackground
void drawOutOfBoundsWithoutBackground(cairo_t *cr, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition: cairo-helpers.cc:93
pixelSizeFromZoom
double pixelSizeFromZoom(int zoom)
Definition: cairo-helpers.cc:112
drawRectangleContour
void drawRectangleContour(cairo_t *cr, Scroom::Utils::Rectangle< double > const &viewArea)
Definition: cairo-helpers.cc:31
setClip
void setClip(cairo_t *cr, double x, double y, double width, double height)
Definition: cairo-helpers.cc:47
Scroom::Utils::Rectangle< double >
Color
Definition: color.hh:34
rectangle.hh