ppdc-mediasize.cxx [plain text]
#include "ppdc-private.h"
ppdcMediaSize::ppdcMediaSize(const char *n, const char *t, float w, float l, float lm, float bm, float rm, float tm, const char *sc, const char *rc) : ppdcShared()
{
PPDC_NEW;
name = new ppdcString(n);
text = new ppdcString(t);
width = w;
length = l;
left = lm;
bottom = bm;
right = rm;
top = tm;
size_code = new ppdcString(sc);
region_code = new ppdcString(rc);
if (left < 0.0f)
left = 0.0f;
if (bottom < 0.0f)
bottom = 0.0f;
if (right < 0.0f)
right = 0.0f;
if (top < 0.0f)
top = 0.0f;
}
ppdcMediaSize::~ppdcMediaSize()
{
PPDC_DELETE;
name->release();
text->release();
size_code->release();
region_code->release();
}