TypeMetric.cpp
Go to the documentation of this file.
// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 2001
//
// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
// dedicated to making software imaging solutions freely available.
//
// TypeMetric implementation
//
#define MAGICKCORE_IMPLEMENTATION 1
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
#include "Magick++/TypeMetric.h"
#include "Magick++/Drawable.h"
#include <string.h>
Magick::TypeMetric::TypeMetric(void)
{
memset(&_typeMetric,0,sizeof(_typeMetric));
}
Magick::TypeMetric::~TypeMetric(void)
{
}
double Magick::TypeMetric::ascent(void) const
{
return(_typeMetric.ascent);
}
Magick::Geometry Magick::TypeMetric::bounds(void) const
{
return(Geometry((size_t) (_typeMetric.bounds.x2-_typeMetric.bounds.x1),
(size_t) (_typeMetric.bounds.y2-_typeMetric.bounds.y1),(ssize_t)
_typeMetric.bounds.x1,(ssize_t) _typeMetric.bounds.y1));
}
double Magick::TypeMetric::descent(void) const
{
return(_typeMetric.descent);
}
double Magick::TypeMetric::maxHorizontalAdvance(void) const
{
return(_typeMetric.max_advance);
}
Magick::Coordinate Magick::TypeMetric::origin(void) const
{
return(Coordinate(_typeMetric.origin.x,_typeMetric.origin.y));
}
Magick::Coordinate Magick::TypeMetric::pixelsPerEm(void) const
{
return(Coordinate(_typeMetric.pixels_per_em.x,_typeMetric.pixels_per_em.y));
}
double Magick::TypeMetric::textHeight(void) const
{
return(_typeMetric.height);
}
double Magick::TypeMetric::textWidth(void) const
{
return(_typeMetric.width);
}
double Magick::TypeMetric::underlinePosition(void) const
{
return(_typeMetric.underline_position);
}
double Magick::TypeMetric::underlineThickness(void) const
{
return(_typeMetric.underline_thickness);
}
Magick::TypeMetric::descent
double descent(void) const
Definition: TypeMetric.cpp:39
Magick::TypeMetric::pixelsPerEm
Coordinate pixelsPerEm(void) const
Definition: TypeMetric.cpp:54
Magick::TypeMetric::underlinePosition
double underlinePosition(void) const
Definition: TypeMetric.cpp:69
TypeMetric.h
Magick::Coordinate
Definition: Drawable.h:48
Drawable.h
Magick::TypeMetric::bounds
Geometry bounds(void) const
Definition: TypeMetric.cpp:32
Magick::TypeMetric::underlineThickness
double underlineThickness(void) const
Definition: TypeMetric.cpp:74
Magick::Geometry
class MagickPPExport Geometry
Definition: Geometry.h:21
Magick::Geometry
Definition: Geometry.h:37
Magick::TypeMetric::textWidth
double textWidth(void) const
Definition: TypeMetric.cpp:64
Magick::TypeMetric::ascent
double ascent(void) const
Definition: TypeMetric.cpp:27
Magick::TypeMetric::textHeight
double textHeight(void) const
Definition: TypeMetric.cpp:59
Magick::TypeMetric::maxHorizontalAdvance
double maxHorizontalAdvance(void) const
Definition: TypeMetric.cpp:44
Magick::TypeMetric::~TypeMetric
~TypeMetric(void)
Definition: TypeMetric.cpp:23
Magick::TypeMetric::TypeMetric
TypeMetric(void)
Definition: TypeMetric.cpp:18
Magick::TypeMetric::origin
Coordinate origin(void) const
Definition: TypeMetric.cpp:49