lib Library API Documentation

KoTextZoomHandler Class Reference

A KoTextZoomHandler converts between an internal text layout resolution of ~1440 DPI (by default) and the point-size for the fonts (those known by the user). More...

#include <kozoomhandler.h>

Inheritance diagram for KoTextZoomHandler:

KoZoomHandler ContextStyle List of all members.

Static Public Member Functions

void setPtToLayoutUnitFactor (int factor)
double ptToLayoutUnitPt (double pt)
int ptToLayoutUnitPt (int ptSize)
KoPoint ptToLayoutUnitPt (const KoPoint &p)
KoRect ptToLayoutUnitPt (const KoRect &r)
double layoutUnitPtToPt (double lupt)
KoPoint layoutUnitPtToPt (const KoPoint &p)

Static Protected Attributes

int m_layoutUnitFactor = 20

Detailed Description

A KoTextZoomHandler converts between an internal text layout resolution of ~1440 DPI (by default) and the point-size for the fonts (those known by the user).

This conversion doesn't depend on the zoom level. Anything depending on the zoom is handled by KoZoomHandler. Not a real class, it only has static methods, since it has no data.

Definition at line 32 of file kozoomhandler.h.


Member Function Documentation

void KoTextZoomHandler::setPtToLayoutUnitFactor int  factor  )  [inline, static]
 

Change the factor that converts between pointsizes and layout units (by default 20 - for 1440 DPI at 72 DPI).

Definition at line 40 of file kozoomhandler.h.

References m_layoutUnitFactor, and setPtToLayoutUnitFactor().

Referenced by setPtToLayoutUnitFactor().

double KoTextZoomHandler::ptToLayoutUnitPt double  pt  )  [inline, static]
 

Not zoom dependent.

Simply convert a pt value (e.g. a frame) to high-resolution layout unit coordinates (in pt).

Definition at line 44 of file kozoomhandler.h.

References m_layoutUnitFactor, and ptToLayoutUnitPt().

Referenced by EmptyElement::calcSizes(), TextElement::calcSizes(), MultilineElement::calcSizes(), and ptToLayoutUnitPt().

int KoTextZoomHandler::ptToLayoutUnitPt int  ptSize  )  [inline, static]
 

Same thing for integer values, e.g.

a font size in pt

Definition at line 47 of file kozoomhandler.h.

References m_layoutUnitFactor.


Member Data Documentation

int KoTextZoomHandler::m_layoutUnitFactor = 20 [static, protected]
 

This being static ensures that the same value is used by all KoZoomHandler instances.

Definition at line 28 of file kozoomhandler.cc.

Referenced by ptToLayoutUnitPt(), and setPtToLayoutUnitFactor().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:32 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003