#include <KoTextZoomHandler.h>
This class extends KoZoomHandler to add support for WYSIWYG text layouting.
Definition at line 28 of file KoTextZoomHandler.h.
◆ KoTextZoomHandler()
| KoTextZoomHandler::KoTextZoomHandler |
( |
| ) |
|
|
inline |
◆ ~KoTextZoomHandler()
| virtual KoTextZoomHandler::~KoTextZoomHandler |
( |
| ) |
|
|
inlinevirtual |
◆ layoutUnitPtToPt() [1/2]
◆ layoutUnitPtToPt() [2/2]
| double KoTextZoomHandler::layoutUnitPtToPt |
( |
double | lupt | ) |
|
|
inlinestatic |
◆ layoutUnitToFontSize()
| double KoTextZoomHandler::layoutUnitToFontSize |
( |
int | luSize, |
|
|
bool | ) const |
Given the font size for the font in layout units, in pt (use pointSize()) this returns the font size to use on screen the current zoom, in pt (use setPointSizeFloat()),.
Definition at line 39 of file KoTextZoomHandler.cpp.
◆ layoutUnitToPixel() [1/2]
| TQPoint KoTextZoomHandler::layoutUnitToPixel |
( |
const TQPoint & | p | ) |
const |
|
inline |
◆ layoutUnitToPixel() [2/2]
| TQRect KoTextZoomHandler::layoutUnitToPixel |
( |
const TQRect & | r | ) |
const |
|
inline |
◆ layoutUnitToPixelX() [1/2]
| int KoTextZoomHandler::layoutUnitToPixelX |
( |
int | lupix | ) |
const |
◆ layoutUnitToPixelX() [2/2]
| int KoTextZoomHandler::layoutUnitToPixelX |
( |
int | x, |
|
|
int | w ) const |
This variant converts a width, using a reference X position.
This prevents rounding problems.
Definition at line 49 of file KoTextZoomHandler.cpp.
◆ layoutUnitToPixelY() [1/2]
| int KoTextZoomHandler::layoutUnitToPixelY |
( |
int | lupix | ) |
const |
◆ layoutUnitToPixelY() [2/2]
| int KoTextZoomHandler::layoutUnitToPixelY |
( |
int | y, |
|
|
int | h ) const |
This variant converts a height, using a reference Y position.
This prevents rounding problems.
Definition at line 57 of file KoTextZoomHandler.cpp.
◆ pixelToLayoutUnit() [1/2]
| TQPoint KoTextZoomHandler::pixelToLayoutUnit |
( |
const TQPoint & | p | ) |
const |
|
inline |
◆ pixelToLayoutUnit() [2/2]
| TQRect KoTextZoomHandler::pixelToLayoutUnit |
( |
const TQRect & | r | ) |
const |
|
inline |
◆ pixelToLayoutUnitX()
| int KoTextZoomHandler::pixelToLayoutUnitX |
( |
int | x | ) |
const |
◆ pixelToLayoutUnitY()
| int KoTextZoomHandler::pixelToLayoutUnitY |
( |
int | y | ) |
const |
◆ pixelToPt()
| KoPoint KoTextZoomHandler::pixelToPt |
( |
const TQPoint & | p | ) |
const |
|
inline |
◆ pixelXToPt()
| double KoTextZoomHandler::pixelXToPt |
( |
int | x | ) |
const |
|
inline |
◆ pixelYToPt()
| double KoTextZoomHandler::pixelYToPt |
( |
int | y | ) |
const |
|
inline |
◆ ptToLayoutUnitPix()
| TQPoint KoTextZoomHandler::ptToLayoutUnitPix |
( |
const KoPoint & | p | ) |
const |
|
inline |
◆ ptToLayoutUnitPixX()
| int KoTextZoomHandler::ptToLayoutUnitPixX |
( |
double | x_pt | ) |
const |
|
inline |
The "document pt" -> "Layout Unit pixels" conversions, for convenience.
Definition at line 83 of file KoTextZoomHandler.h.
◆ ptToLayoutUnitPixY()
| int KoTextZoomHandler::ptToLayoutUnitPixY |
( |
double | y_pt | ) |
const |
|
inline |
◆ ptToLayoutUnitPt() [1/4]
◆ ptToLayoutUnitPt() [2/4]
| KoRect KoTextZoomHandler::ptToLayoutUnitPt |
( |
const KoRect & | r | ) |
|
|
inlinestatic |
◆ ptToLayoutUnitPt() [3/4]
| double KoTextZoomHandler::ptToLayoutUnitPt |
( |
double | pt | ) |
|
|
inlinestatic |
Not zoom dependent.
Simply convert a pt value (e.g. a frame) to high-resolution layout unit coordinates (in pt).
Definition at line 112 of file KoTextZoomHandler.h.
◆ ptToLayoutUnitPt() [4/4]
| int KoTextZoomHandler::ptToLayoutUnitPt |
( |
int | ptSize | ) |
|
|
inlinestatic |
◆ ptToPixel()
| TQPoint KoTextZoomHandler::ptToPixel |
( |
const KoPoint & | p | ) |
const |
|
inline |
◆ ptToPixelX()
| int KoTextZoomHandler::ptToPixelX |
( |
double | pt | ) |
const |
|
inline |
Basic pt to pixel and pixel to pt conversions, valid at any zoom level, as well as at the Layout Unit level (and mostly useful for Layout Units).
Don't confuse with zoomIt, which also converts pt to pixels, but applying the zoom!
Definition at line 67 of file KoTextZoomHandler.h.
◆ ptToPixelY()
| int KoTextZoomHandler::ptToPixelY |
( |
double | pt | ) |
const |
|
inline |
◆ setPtToLayoutUnitFactor()
| void KoTextZoomHandler::setPtToLayoutUnitFactor |
( |
int | factor | ) |
|
|
inlinestatic |
Change the factor that converts between pointsizes and layout units (by default 20 - for 1440 DPI at 72 DPI).
Definition at line 108 of file KoTextZoomHandler.h.
◆ m_layoutUnitFactor
| int KoTextZoomHandler::m_layoutUnitFactor = 20 |
|
staticprotected |
The documentation for this class was generated from the following files:
|