Okular::Utils Class Reference

#include <utils.h>

Static Public Member Functions

static NormalizedRect imageBoundingBox (const QImage *image)
static QSizeF realDpi (QWidget *widgetOnScreen)
static QRect rotateRect (const QRect &source, int width, int height, int orientation)

Detailed Description

General utility functions.

This class contains some static functions of general utility.

Definition at line 27 of file utils.h.

Member Function Documentation

NormalizedRect Utils::imageBoundingBox ( const QImage image)

Compute the smallest rectangle that contains all non-white pixels in image), in normalized [0,1] coordinates.

0.7 (KDE 4.1)

Definition at line 72 of file utils.cpp.

QSizeF Utils::realDpi ( QWidget widgetOnScreen)

Return the real DPI of the display containing given widget.

On X11, it can indicate the real horizontal DPI value without any Xrdb setting. Otherwise, returns the same as realDpiX/Y(),

0.19 (KDE 4.13)

Definition at line 50 of file utils.cpp.

QRect Utils::rotateRect ( const QRect source,
int  width,
int  height,
int  orientation 

Rotate the rect source in the area width x height with the specified orientation .

Definition at line 27 of file utils.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:34:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.