Commit 61b692cf authored by Allison Vacanti's avatar Allison Vacanti Committed by Kitware Robot

Merge topic 'update_libharu'

b5efa708 Merge branch 'upstream-libharu' into update_libharu
2f69cc63 libharu 2018-10-03 (bfc84ae5)
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Scott Wittenburg's avatarScott Wittenburg <scott.wittenburg@kitware.com>
Merge-request: !4732
parents 21c723b2 b5efa708
......@@ -67,13 +67,13 @@ case of most of UNIX, these libraries are usually installed.)
*
* Available development environment
*
Haru can work as both static-library (.a, .lib) and shared-library (.so, .dll).
When you use it as static-library, It can be used by C and a C++.
But when you use it as shared-library, it can be used by many development
languages which support shared library.
So far, Haru provides bindings for Ruby, Delphi/Free Pascal and C#.
Haru can work as both a static-library (.a, .lib) and a shared-library (.so, .dll).
When you use it as a static-library, It can be used by C and C++.
But when you use it as a shared-library, it can be used by many development
languages which support shared libraries.
So far, Haru provides bindings for Ruby, Delphi/Free Pascal, and C#.
If you write bindings for other programing languages, please notice me!
If you write bindings for other programing languages, please inform me!
*
* Runtime environment of programs using Haru
......
......@@ -80,6 +80,7 @@ typedef HPDF_HANDLE HPDF_EmbeddedFile;
typedef HPDF_HANDLE HPDF_OutputIntent;
typedef HPDF_HANDLE HPDF_Xref;
typedef HPDF_HANDLE HPDF_Shading;
typedef HPDF_HANDLE HPDF_Boolean;
#else
......@@ -194,6 +195,9 @@ HPDF_GetPageByIndex (HPDF_Doc pdf,
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
HPDF_EXPORT(HPDF_MMgr)
HPDF_GetPageMMgr (HPDF_Page page);
HPDF_EXPORT(HPDF_PageLayout)
HPDF_GetPageLayout (HPDF_Doc pdf);
......@@ -453,13 +457,31 @@ HPDF_EXPORT(HPDF_STATUS)
HPDF_UseUTFEncodings (HPDF_Doc pdf);
/*--------------------------------------------------------------------------*/
/*----- XObject ------------------------------------------------------------*/
HPDF_EXPORT(HPDF_XObject)
HPDF_Page_CreateXObjectFromImage (HPDF_Doc pdf,
HPDF_Page page,
HPDF_Rect rect,
HPDF_Image image,
HPDF_Boolean zoom);
HPDF_EXPORT(HPDF_XObject)
HPDF_Page_CreateXObjectAsWhiteRect (HPDF_Doc pdf,
HPDF_Page page,
HPDF_Rect rect);
/*--------------------------------------------------------------------------*/
/*----- annotation ---------------------------------------------------------*/
HPDF_EXPORT(HPDF_Annotation)
HPDF_Page_Create3DAnnot (HPDF_Page page,
HPDF_Rect rect,
HPDF_U3D u3d);
HPDF_BOOL tb,
HPDF_BOOL np,
HPDF_U3D u3d,
HPDF_Image ap);
HPDF_EXPORT(HPDF_Annotation)
HPDF_Page_CreateTextAnnot (HPDF_Page page,
......@@ -478,6 +500,15 @@ HPDF_Page_CreateLineAnnot (HPDF_Page page,
const char *text,
HPDF_Encoder encoder);
HPDF_EXPORT(HPDF_Annotation)
HPDF_Page_CreateWidgetAnnot_WhiteOnlyWhilePrint (HPDF_Doc pdf,
HPDF_Page page,
HPDF_Rect rect);
HPDF_EXPORT(HPDF_Annotation)
HPDF_Page_CreateWidgetAnnot (HPDF_Page page,
HPDF_Rect rect);
HPDF_EXPORT(HPDF_Annotation)
HPDF_Page_CreateLinkAnnot (HPDF_Page page,
HPDF_Rect rect,
......@@ -555,6 +586,9 @@ HPDF_EXPORT(HPDF_STATUS)
HPDF_LinkAnnot_SetHighlightMode (HPDF_Annotation annot,
HPDF_AnnotHighlightMode mode);
HPDF_EXPORT(HPDF_STATUS)
HPDF_LinkAnnot_SetJavaScript(HPDF_Annotation annot,
HPDF_JavaScript javascript);
HPDF_EXPORT(HPDF_STATUS)
HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot,
......@@ -624,7 +658,7 @@ HPDF_EXPORT(HPDF_STATUS)
HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_Point rb, HPDF_Point rt, HPDF_Point lt); /* l-left, r-right, b-bottom, t-top positions */
HPDF_EXPORT(HPDF_STATUS)
HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
HPDF_Annotation annot,
HPDF_Annotation annot3d,
HPDF_Dict view);
......@@ -646,8 +680,8 @@ HPDF_EXPORT(HPDF_STATUS)
HPDF_FreeTextAnnot_SetDefaultStyle (HPDF_Annotation annot, const char* style);
HPDF_EXPORT(HPDF_STATUS)
HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle,
HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle,
HPDF_Point endPoint, HPDF_LineAnnotEndingStyle endStyle);
HPDF_EXPORT(HPDF_STATUS)
......@@ -689,29 +723,29 @@ HPDF_Page_CreatePD33DMeasure(HPDF_Page page,
);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetName(HPDF_3DMeasure measure,
HPDF_3DMeasure_SetName(HPDF_3DMeasure measure,
const char* name);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetColor(HPDF_3DMeasure measure,
HPDF_3DMeasure_SetColor(HPDF_3DMeasure measure,
HPDF_RGBColor color);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetTextSize(HPDF_3DMeasure measure,
HPDF_3DMeasure_SetTextSize(HPDF_3DMeasure measure,
HPDF_REAL textsize);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetTextBoxSize(HPDF_3DMeasure measure,
HPDF_3DC3DMeasure_SetTextBoxSize(HPDF_3DMeasure measure,
HPDF_INT32 x,
HPDF_INT32 y);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetText(HPDF_3DMeasure measure,
HPDF_3DC3DMeasure_SetText(HPDF_3DMeasure measure,
const char* text,
HPDF_Encoder encoder);
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetProjectionAnotation(HPDF_3DMeasure measure,
HPDF_3DC3DMeasure_SetProjectionAnotation(HPDF_3DMeasure measure,
HPDF_Annotation projectionanotation);
/*--------------------------------------------------------------------------*/
......@@ -1575,14 +1609,14 @@ HPDF_EXPORT(HPDF_OutputIntent)
HPDF_ICC_LoadIccFromMem (HPDF_Doc pdf,
HPDF_MMgr mmgr,
HPDF_Stream iccdata,
HPDF_Xref xref,
HPDF_Xref xref,
int numcomponent);
HPDF_EXPORT(HPDF_OutputIntent)
HPDF_LoadIccProfileFromFile (HPDF_Doc pdf,
const char* icc_file_name,
int numcomponent);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -34,6 +34,10 @@ HPDF_Annotation_New (HPDF_MMgr mmgr,
HPDF_AnnotType type,
HPDF_Rect rect);
HPDF_Annotation
HPDF_WidgetAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
HPDF_Rect rect);
HPDF_Annotation
HPDF_LinkAnnot_New (HPDF_MMgr mmgr,
......@@ -53,7 +57,10 @@ HPDF_Annotation
HPDF_3DAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
HPDF_Rect rect,
HPDF_U3D u3d);
HPDF_BOOL tb,
HPDF_BOOL np,
HPDF_U3D u3d,
HPDF_Image ap);
HPDF_Annotation
HPDF_MarkupAnnot_New (HPDF_MMgr mmgr,
......
......@@ -109,14 +109,14 @@
#define HPDF_LIMIT_MAX_INT 2147483647
#define HPDF_LIMIT_MIN_INT -2147483647
#define HPDF_LIMIT_MAX_REAL 32767
#define HPDF_LIMIT_MIN_REAL -32767
#define HPDF_LIMIT_MAX_REAL 3.4E38f // per PDF 1.7 spec, Annex C, old value 32767
#define HPDF_LIMIT_MIN_REAL -3.4E38f // per PDF 1.7 spec, Annex C, old value -32767
#define HPDF_LIMIT_MAX_STRING_LEN 65535
#define HPDF_LIMIT_MAX_STRING_LEN 2147483646 // per PDF 1.7 spec, limit 32767 is for strings in content stream and no limit in other cases => open the limit to max Integer, old value 65535
#define HPDF_LIMIT_MAX_NAME_LEN 127
#define HPDF_LIMIT_MAX_ARRAY 32767
#define HPDF_LIMIT_MAX_DICT_ELEMENT 4095
#define HPDF_LIMIT_MAX_ARRAY 8388607 // per PDF 1.7 spec, "Maximum number of indirect objects in a PDF file" is 8388607, old value 8191
#define HPDF_LIMIT_MAX_DICT_ELEMENT 8388607 // per PDF 1.7 spec, "Maximum number of indirect objects in a PDF file" is 8388607, old value 4095
#define HPDF_LIMIT_MAX_XREF_ELEMENT 8388607
#define HPDF_LIMIT_MAX_GSTATE 28
#define HPDF_LIMIT_MAX_DEVICE_N 8
......
......@@ -382,6 +382,8 @@ HPDF_STATUS
HPDF_Array_AddReal (HPDF_Array array,
HPDF_REAL value);
HPDF_STATUS
HPDF_Array_AddNull (HPDF_Array array);
HPDF_STATUS
HPDF_Array_AddName (HPDF_Array array,
......
......@@ -152,7 +152,7 @@ typedef enum _HPDF_InfoType {
/* PDF-A Types */
typedef enum _HPDF_PDFA_TYPE
typedef enum _HPDF_PDFA_TYPE
{
HPDF_PDFA_1A = 0,
HPDF_PDFA_1B = 1
......@@ -225,6 +225,23 @@ typedef struct _HPDF_TransMatrix {
HPDF_REAL y;
} HPDF_TransMatrix;
/*---------------------------------------------------------------------------*/
/*----- HPDF_3DMatrix struct ------------------------------------------------*/
typedef struct _HPDF_3DMatrix {
HPDF_REAL a;
HPDF_REAL b;
HPDF_REAL c;
HPDF_REAL d;
HPDF_REAL e;
HPDF_REAL f;
HPDF_REAL g;
HPDF_REAL h;
HPDF_REAL i;
HPDF_REAL tx;
HPDF_REAL ty;
HPDF_REAL tz;
} HPDF_3DMatrix;
/*---------------------------------------------------------------------------*/
......@@ -368,7 +385,8 @@ typedef enum _HPDF_AnnotType {
HPDF_ANNOT_3D,
HPDF_ANNOT_SQUIGGLY,
HPDF_ANNOT_LINE,
HPDF_ANNOT_PROJECTION
HPDF_ANNOT_PROJECTION,
HPDF_ANNOT_WIDGET
} HPDF_AnnotType;
......@@ -499,7 +517,7 @@ typedef enum _HPDF_TransitionStyle {
HPDF_TS_GLITTER_TOP_LEFT_TO_BOTTOM_RIGHT,
HPDF_TS_REPLACE,
HPDF_TS_EOF
} HPDF_TransitionStyle;
} HPDF_TransitionStyle;
/*----------------------------------------------------------------------------*/
......
......@@ -25,6 +25,7 @@ extern "C" {
#endif
HPDF_EXPORT(HPDF_JavaScript) HPDF_CreateJavaScript(HPDF_Doc pdf, const char *code);
HPDF_EXPORT(HPDF_JavaScript) HPDF_LoadJSFromFile (HPDF_Doc pdf, const char *filename);
HPDF_EXPORT(HPDF_U3D) HPDF_LoadU3DFromFile (HPDF_Doc pdf, const char *filename);
......@@ -33,12 +34,19 @@ HPDF_EXPORT(HPDF_Dict) HPDF_Create3DView (HPDF_MMgr mmgr, const char *name);
HPDF_EXPORT(HPDF_STATUS) HPDF_U3D_Add3DView(HPDF_U3D u3d, HPDF_Dict view);
HPDF_EXPORT(HPDF_STATUS) HPDF_U3D_SetDefault3DView(HPDF_U3D u3d, const char *name);
HPDF_EXPORT(HPDF_STATUS) HPDF_U3D_AddOnInstanciate(HPDF_U3D u3d, HPDF_JavaScript javaScript);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_AddNode(HPDF_Dict view, const char *name, HPDF_REAL opacity, HPDF_BOOL visible);
HPDF_EXPORT(HPDF_Dict) HPDF_3DView_CreateNode(HPDF_Dict view, const char *name);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DViewNode_SetOpacity(HPDF_Dict node, HPDF_REAL opacity);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DViewNode_SetVisibility(HPDF_Dict node, HPDF_BOOL visible);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DViewNode_SetMatrix(HPDF_Dict node, HPDF_3DMatrix Mat3D);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_AddNode(HPDF_Dict view, HPDF_Dict node);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetLighting(HPDF_Dict view, const char *scheme);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetBackgroundColor(HPDF_Dict view, HPDF_REAL r, HPDF_REAL g, HPDF_REAL b);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetPerspectiveProjection(HPDF_Dict view, HPDF_REAL fov);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetOrthogonalProjection(HPDF_Dict view, HPDF_REAL mag);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCamera(HPDF_Dict view, HPDF_REAL coox, HPDF_REAL cooy, HPDF_REAL cooz, HPDF_REAL c2cx, HPDF_REAL c2cy, HPDF_REAL c2cz, HPDF_REAL roo, HPDF_REAL roll);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCameraByMatrix(HPDF_Dict view, HPDF_3DMatrix Mat3D, HPDF_REAL co);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCrossSectionOn(HPDF_Dict view, HPDF_Point3D center, HPDF_REAL Roll, HPDF_REAL Pitch, HPDF_REAL opacity, HPDF_BOOL showintersection);
HPDF_EXPORT(HPDF_STATUS) HPDF_3DView_SetCrossSectionOff(HPDF_Dict view);
HPDF_Dict
HPDF_3DView_New ( HPDF_MMgr mmgr,
......
/* automatically generated by configure */
/* edit configure.in to change version number */
#define HPDF_MAJOR_VERSION 2
#define HPDF_MINOR_VERSION 3
#define HPDF_MINOR_VERSION 4
#define HPDF_BUGFIX_VERSION 0
#define HPDF_EXTRA_VERSION "RC2"
#define HPDF_VERSION_TEXT "2.3.0RC2"
#define HPDF_VERSION_ID 20300
#define HPDF_EXTRA_VERSION "dev"
#define HPDF_VERSION_TEXT "2.4.0dev"
#define HPDF_VERSION_ID 20400
......@@ -39,6 +39,7 @@ static const char * const HPDF_ANNOT_TYPE_NAMES[] = {
"Squiggly",
"Line",
"Projection"
"Widget"
};
static const char * const HPDF_ANNOT_ICON_NAMES_NAMES[] = {
......@@ -222,6 +223,21 @@ HPDF_Annotation_SetBorderStyle (HPDF_Annotation annot,
return HPDF_OK;
}
HPDF_Annotation
HPDF_WidgetAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
HPDF_Rect rect)
{
HPDF_Annotation annot;
HPDF_PTRACE((" HPDF_WidgetAnnot_New\n"));
annot = HPDF_Annotation_New (mmgr, xref, HPDF_ANNOT_WIDGET, rect);
if (!annot)
return NULL;
return annot;
}
HPDF_Annotation
HPDF_LinkAnnot_New (HPDF_MMgr mmgr,
......@@ -237,8 +253,11 @@ HPDF_LinkAnnot_New (HPDF_MMgr mmgr,
if (!annot)
return NULL;
if (dst)
{
if (HPDF_Dict_Add (annot, "Dest", dst) != HPDF_OK)
return NULL;
}
return annot;
}
......@@ -279,6 +298,35 @@ HPDF_URILinkAnnot_New (HPDF_MMgr mmgr,
return annot;
}
HPDF_EXPORT(HPDF_STATUS)
HPDF_LinkAnnot_SetJavaScript(HPDF_Annotation annot, HPDF_JavaScript javascript)
{
HPDF_Dict action;
HPDF_STATUS ret;
HPDF_PTRACE((" HPDF_LinkAnnot_SetJavaScript\n"));
if (!CheckSubType (annot, HPDF_ANNOT_LINK))
return HPDF_INVALID_ANNOTATION;
/* create action dictionary */
action = HPDF_Dict_New (annot->mmgr);
if (!action)
return HPDF_CheckError ( annot->error);
ret = HPDF_Dict_Add (annot, "A", action);
if (ret != HPDF_OK)
return HPDF_CheckError (annot->error);
ret += HPDF_Dict_Add (action, "JS", javascript);
ret += HPDF_Dict_AddName (action, "S", "JavaScript");
if (ret != HPDF_OK)
return HPDF_CheckError (annot->error);
return HPDF_OK;
}
HPDF_EXPORT(HPDF_STATUS)
HPDF_LinkAnnot_SetBorderStyle (HPDF_Annotation annot,
HPDF_REAL width,
......@@ -366,7 +414,10 @@ HPDF_Annotation
HPDF_3DAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
HPDF_Rect rect,
HPDF_U3D u3d)
HPDF_BOOL tb,
HPDF_BOOL np,
HPDF_U3D u3d,
HPDF_Image ap)
{
HPDF_Annotation annot;
HPDF_Dict action, appearance, stream;
......@@ -378,7 +429,14 @@ HPDF_3DAnnot_New (HPDF_MMgr mmgr,
if (!annot) {
return NULL;
}
// include the flags
HPDF_Dict_AddNumber (annot, "F", 68);
//Bit 3:Print If set, print the annotation when the page is printed.
//Bit 7:If set, do not allow the annotation to interact with the user.
// The annotation may be displayed or printed (depending on the settings of the NoView and Print flags)
// but should not respond to mouse clicks or change its appearance in response to mouse motions.
HPDF_Dict_Add(annot, "Contents", HPDF_String_New (mmgr, "3D Model", NULL));
action = HPDF_Dict_New (mmgr);
......@@ -391,9 +449,20 @@ HPDF_3DAnnot_New (HPDF_MMgr mmgr,
return NULL;
}
ret += HPDF_Dict_AddName (action, "A", "PV");
// enable visibility on page open
ret += HPDF_Dict_AddName (action, "A", "PO");
// enable visibility of ToolBar
ret += HPDF_Dict_AddBoolean(action, "TB", tb);
ret += HPDF_Dict_AddBoolean(action, "TB", HPDF_FALSE);
// enable visibility of Navigation Panel
ret += HPDF_Dict_AddBoolean(action, "NP", np);
// Set behavior of Annotation on Disabling
ret += HPDF_Dict_AddName(action, "DIS", "U");
// Set behavior of Annotation upon activation
ret += HPDF_Dict_AddName(action, "AIS", "L");
if (ret != HPDF_OK) {
return NULL;
......@@ -413,11 +482,18 @@ HPDF_3DAnnot_New (HPDF_MMgr mmgr,
return NULL;
}
if (ap) {
if (HPDF_Dict_Add (appearance, "N", ap) != HPDF_OK)
return NULL;
}
else{
stream = HPDF_Dict_New (mmgr);
if (!stream) {
return NULL;
}
ret = HPDF_Dict_Add (appearance, "N", stream);
}
if (ret != HPDF_OK) {
return NULL;
}
......@@ -425,23 +501,6 @@ HPDF_3DAnnot_New (HPDF_MMgr mmgr,
return annot;
}
HPDF_EXPORT(HPDF_STATUS)
HPDF_3DAnnot_Set3DView (HPDF_Annotation annot)
{
HPDF_Boolean b;
HPDF_PTRACE((" HPDF_3DAnnot_Set3DView\n"));
if (!CheckSubType (annot, HPDF_ANNOT_3D))
return HPDF_INVALID_ANNOTATION;
b = HPDF_Boolean_New (annot->mmgr, 0);
if (!b)
return HPDF_CheckError (annot->error);
return HPDF_Dict_Add (annot, "3DD", b);
}
HPDF_Annotation
HPDF_MarkupAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
......@@ -533,7 +592,7 @@ HPDF_Annot_SetGrayColor (HPDF_Annotation annot, HPDF_REAL color)
if (ret != HPDF_OK)
return HPDF_Error_GetCode ( annot->error);
return HPDF_OK;
}
......@@ -550,7 +609,7 @@ HPDF_Annot_SetNoColor (HPDF_Annotation annot)
return HPDF_Error_GetCode ( annot->error);
ret = HPDF_Dict_Add (annot, "C", cArray);
return ret;
}
......@@ -788,7 +847,7 @@ CheckSubType (HPDF_Annotation annot,
}
HPDF_EXPORT(HPDF_STATUS)
HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
HPDF_Annotation annot,
HPDF_Annotation annot3d,
HPDF_Dict view3d)
......@@ -796,11 +855,11 @@ HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
HPDF_Proxy proxyView3d;
HPDF_Dict exData = HPDF_Dict_New( mmgr);
HPDF_STATUS retS = HPDF_OK;
retS += HPDF_Dict_AddName( exData, "Type", "ExData");
retS += HPDF_Dict_AddName( exData, "Subtype", "Markup3D");
retS += HPDF_Dict_Add( exData, "3DA", annot3d);
proxyView3d = HPDF_Proxy_New( mmgr, view3d);
retS += HPDF_Dict_Add( exData, "3DV", proxyView3d);
......@@ -833,7 +892,7 @@ HPDF_Annotation
HPDF_StampAnnot_New (HPDF_MMgr mmgr,
HPDF_Xref xref,
HPDF_Rect rect,
HPDF_StampAnnotName name,
HPDF_StampAnnotName name,
const char* text,
HPDF_Encoder encoder)
{
......@@ -847,7 +906,7 @@ HPDF_StampAnnot_New (HPDF_MMgr mmgr,
if (HPDF_Dict_AddName ( annot, "Name", HPDF_STAMP_ANNOT_NAME_NAMES[name]) != HPDF_OK)
return NULL;
s = HPDF_String_New (mmgr, text, encoder);
if (!s)
return NULL;
......@@ -891,7 +950,7 @@ HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_TextMarkupAnnot_SetQuadPoints\n"));
quadPoints = HPDF_Array_New ( annot->mmgr);
if ( !quadPoints)
return HPDF_Error_GetCode ( annot->error);
......@@ -946,7 +1005,7 @@ HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect) /* RD ent
HPDF_REAL tmp;
HPDF_PTRACE((" HPDF_MarkupAnnot_SetRectDiff\n"));
array = HPDF_Array_New ( annot->mmgr);
if ( !array)
return HPDF_Error_GetCode ( annot->error);
......@@ -977,9 +1036,9 @@ HPDF_FreeTextAnnot_SetDefaultStyle (HPDF_Annotation annot,
{
HPDF_String s;
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_FreeTextAnnot_SetDefaultStyle\n"));
s = HPDF_String_New ( annot->mmgr, style, NULL);
if ( !s)
return HPDF_Error_GetCode ( annot->error);
......@@ -996,7 +1055,7 @@ HPDF_FreeTextAnnot_Set3PointCalloutLine ( HPDF_Annotation annot, HPDF_Point star
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_FreeTextAnnot_Set3PointCalloutLine\n"));
clPoints = HPDF_Array_New ( annot->mmgr);
if ( !clPoints)
return HPDF_Error_GetCode ( annot->error);
......@@ -1024,7 +1083,7 @@ HPDF_FreeTextAnnot_Set2PointCalloutLine ( HPDF_Annotation annot, HPDF_Point star
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_FreeTextAnnot_Set3PointCalloutLine\n"));
clPoints = HPDF_Array_New ( annot->mmgr);
if ( !clPoints)
return HPDF_Error_GetCode ( annot->error);
......@@ -1050,15 +1109,15 @@ HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity
HPDF_STATUS ret = HPDF_OK;
HPDF_PTRACE((" HPDF_MarkupAnnot_SetCloudEffect\n"));
borderEffect = HPDF_Dict_New ( annot->mmgr);
if (!borderEffect)
return HPDF_Error_GetCode ( annot->error);
ret += HPDF_Dict_Add ( annot, "BE", borderEffect);
ret += HPDF_Dict_AddName ( borderEffect, "S", "C");
ret += HPDF_Dict_AddNumber ( borderEffect, "I", cloudIntensity);
if (ret != HPDF_OK)
return HPDF_Error_GetCode (annot->error);
......@@ -1066,8 +1125,8 @@ HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity
}
HPDF_EXPORT(HPDF_STATUS)
HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle,
HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
HPDF_Point startPoint, HPDF_LineAnnotEndingStyle startStyle,
HPDF_Point endPoint, HPDF_LineAnnotEndingStyle endStyle)
{