3
Copyright (c) 2006-2007, BBR Inc. All rights reserved.
5
Permission is hereby granted, free of charge, to any person obtaining
6
a copy of this software and associated documentation files (the
7
"Software"), to deal in the Software without restriction, including
8
without limitation the rights to use, copy, modify, merge, publish,
9
distribute, sublicense, and/or sell copies of the Software, and to
10
permit persons to whom the Software is furnished to do so, subject to
11
the following conditions:
13
The above copyright notice and this permission notice shall be included
14
in all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
pdftopdf resouces dictionary
29
#ifndef _P2PRESOURCES_H_
30
#define _P2PRESOURCES_H_
34
#include "P2PObject.h"
37
#include "P2POutputStream.h"
38
#include "P2PPattern.h"
39
#include "UGooString.h"
42
class P2PFontResource;
44
class P2PResources: public P2PObject {
55
static const char *dictNames[NDict];
56
P2PResources(XRef *xrefA);
58
void output(P2POutputStream *str);
59
void setP2PFontResource(P2PFontResource *fontResourceA) {
60
fontResource = fontResourceA;
62
P2PFontResource *getP2PFontResource() {
65
/* merge resources and return mapping table */
66
P2PResourceMap *merge(Dict *res);
67
P2PResourceMap *merge(P2PResources *res);
68
Dict *getFontResource() {
69
return dictionaries[Font];
71
Dict *getExtGState() {
72
return dictionaries[ExtGState];
75
void refPattern(char *name, P2PMatrix *matA);
77
class P2PPatternDict {
84
if (name != 0) delete[] name;
85
if (pattern != 0) delete pattern;
92
Dict *dictionaries[NDict];
93
unsigned int resourceNo;
94
P2PPatternDict *patternDict;
96
P2PFontResource *fontResource;
100
void mergeOneDict(Dict *dst, Dict *src, Dict *map, GBool unify);
101
#ifdef HAVE_UGOOSTRING_H
102
void addDict(Dict *dict, Object *obj, UGooString *srckey, Dict *map);
104
void addDict(Dict *dict, Object *obj, char *srckey, Dict *map);
106
#ifdef HAVE_UGOOSTRING_H
107
void addMap(UGooString *org, char *mapped, Dict *map);
109
void addMap(char *org, char *mapped, Dict *map);
111
void handleOldForm(P2PResourceMap *map);
114
/* resource name mapping table */
115
class P2PResourceMap {
120
Dict *tables[P2PResources::NDict];