2 #ifndef PDFTRON_H_CPPPDFOptionsBase
3 #define PDFTRON_H_CPPPDFOptionsBase
10 namespace pdftron{
namespace PDF{
19 m_dict = m_obj_set.CreateDict();
80 while(arr.
Size() <= index)
105 red = (int)(255*cp.
Get(0));
109 else if(num_comp == 3 || num_comp == 4) {
110 red = (int)(255*cp.
Get(0));
111 green = (int)(255*cp.
Get(1));
112 blue = (int)(255*cp.
Get(2));
115 alpha = (int)(255*cp.
Get(3));
117 UInt32 num = ((0xFF&alpha) << 24)
119 | ((0xFF&green) << 8)
120 | ((0xFF&blue) << 0);
126 return ColorPt(((num >> 16) & 0xFF)/255.0,
127 ((num >> 8) & 0xFF)/255.0,
128 ((num >> 0) & 0xFF)/255.0,
129 ((num >> 24)&0xFF)/255.0);
134 const SDF::Obj& GetInternalObj()
const
145 SDF::ObjSet m_obj_set;
154 #endif // PDFTRON_H_CPPPDFOptionsBase
static SDF::Obj GetArray(SDF::Obj dict, const char *key)
Obj PutBool(const char *key, bool value)
static void PutText(SDF::Obj dict, const char *key, const UString &text)
Obj PutNumber(const char *key, double value)
Obj PushBackRect(double x1, double y1, double x2, double y2)
static void PushBackRect(SDF::Obj dict, const char *key, const Rect &rect)
static void PushBackBool(SDF::Obj dict, const char *key, bool val)
static void PutBool(SDF::Obj dict, const char *key, bool val)
static ColorPt ColorPtFromNumber(double dnum)
Obj PutText(const char *key, const UString &value)
static Rect RectFromArray(void *)
static void PushBackText(SDF::Obj dict, const char *key, const UString &text)
Obj PushBackBool(bool value)
Rect GetRectAt(size_t index) const
Obj PushBackNumber(double value)
static void PutRect(SDF::Obj dict, const char *key, const Rect &rect)
Obj PutRect(const char *key, double x1, double y1, double x2, double y2)
Obj PushBackText(const UString &value)
static double ColorPtToNumber(const ColorPt &cp)
Obj PutArray(const char *key)
double Get(int colorant_index) const
Obj FindObj(const char *key)
size_t GetNumRects() const
static void PutNumber(SDF::Obj dict, const char *key, double num)
static void InsertRectCollection(SDF::Obj dict, const char *key, const RectCollection &rects, int index)
Obj GetAt(size_t index) const
static void PushBackNumber(SDF::Obj dict, const char *key, double num)
static Rect RectFromArray(SDF::Obj nums)