Scroom 0.14-48-ga0fee447
Loading...
Searching...
No Matches
cairo-helpers.hh
Go to the documentation of this file.
1/*
2 * Scroom - Generic viewer for 2D data
3 * Copyright (C) 2009-2026 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
19namespace Colors
20{
21 extern const Color OUT_OF_BOUNDS;
22}
23
24void traceRectangleContour(cairo_t* cr, Scroom::Utils::Rectangle<double> const& viewArea);
25void drawRectangleContour(cairo_t* cr, Scroom::Utils::Rectangle<double> const& viewArea);
26void drawRectangleContour(cairo_t* cr, Color const& c, Scroom::Utils::Rectangle<double> const& viewArea);
27void setClip(cairo_t* cr, double x, double y, double width, double height);
28void setClip(cairo_t* cr, const Scroom::Utils::Rectangle<double>& area);
29void drawRectangle(cairo_t* cr, Color const& c, Scroom::Utils::Rectangle<double> const& viewArea);
31 cairo_t* cr,
32 Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
33 Scroom::Utils::Rectangle<double> const& actualPresentationArea,
34 double pixelSize
35);
37 cairo_t* cr,
38 const Color& background,
39 Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
40 Scroom::Utils::Rectangle<double> const& actualPresentationArea,
41 double pixelSize
42);
44 cairo_t* cr,
45 Scroom::Utils::Rectangle<double> const& requestedPresentationArea,
46 Scroom::Utils::Rectangle<double> const& actualPresentationArea,
47 double pixelSize
48);
49double pixelSizeFromZoom(int zoom);
void drawRectangleContour(cairo_t *cr, Scroom::Utils::Rectangle< double > const &viewArea)
Definition cairo-helpers.cc:31
void drawOutOfBoundsWithBackground(cairo_t *cr, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition cairo-helpers.cc:74
void traceRectangleContour(cairo_t *cr, Scroom::Utils::Rectangle< double > const &viewArea)
Definition cairo-helpers.cc:22
void setClip(cairo_t *cr, double x, double y, double width, double height)
Definition cairo-helpers.cc:47
void drawRectangle(cairo_t *cr, Color const &c, Scroom::Utils::Rectangle< double > const &viewArea)
Definition cairo-helpers.cc:62
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:85
double pixelSizeFromZoom(int zoom)
Definition cairo-helpers.cc:123
void drawOutOfBoundsWithoutBackground(cairo_t *cr, Scroom::Utils::Rectangle< double > const &requestedPresentationArea, Scroom::Utils::Rectangle< double > const &actualPresentationArea, double pixelSize)
Definition cairo-helpers.cc:97
Definition color.hh:37
Definition rectangle.hh:29
Definition cairo-helpers.hh:20
const Color OUT_OF_BOUNDS
Semaphore c(0)
cairo_t * cr
Definition transformpresentation_test.cc:72