Okular::Utils

Search for usage in LXR

Okular::Utils Class Reference

#include <utils.h>

Static Public Member Functions

static NormalizedRect imageBoundingBox (const QImage *image)
 
static QSizeF realDpi (const QWindow *windowOnScreen)
 
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 23 of file utils.h.

Member Function Documentation

◆ imageBoundingBox()

NormalizedRect Utils::imageBoundingBox ( const QImage image)
static

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

Since
0.7 (KDE 4.1)

Definition at line 69 of file utils.cpp.

◆ realDpi()

QSizeF Utils::realDpi ( const QWindow windowOnScreen)
static

Return the real DPI of the display containing given window.

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

Since
22.04

Definition at line 47 of file utils.cpp.

◆ rotateRect()

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

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

Definition at line 24 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-2022 The KDE developers.
Generated on Fri Aug 19 2022 04:10:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.