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:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

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

Static Protected Attributes

static 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

static 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.

static 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.

Referenced by KoParagCounter::bulletX(), MultilineElement::calcSizes(), KoTextFormat::charWidthLU(), ContextStyle::getAdjustedSize(), KoZoomHandler::ptToLayoutUnitPixX(), KoTextFormat::screenPointSize(), KoTextFormat::width(), and KoTextObject::zoomedFontSize().

static 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.


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 29 of file kozoomhandler.cc.

Referenced by KoZoomHandler::layoutUnitToPixelX(), and KoZoomHandler::pixelToLayoutUnitX().


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.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:41:35 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003