* contrib/hbhpdf/3rd/libhpdf/libhpdf.hbp
* contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
+ contrib/hbhpdf/3rd/libhpdf/hpdf3dme.h
+ contrib/hbhpdf/3rd/libhpdf/hpdf3dme.c
+ contrib/hbhpdf/3rd/libhpdf/hpdfencu.c
+ contrib/hbhpdf/3rd/libhpdf/hpdfexda.h
+ contrib/hbhpdf/3rd/libhpdf/hpdfexda.c
+ contrib/hbhpdf/3rd/libhpdf/hpdfimac.c
+ contrib/hbhpdf/3rd/libhpdf/t4.h
* contrib/hbhpdf/3rd/libhpdf/*
+ libharu 2.2.1 -> 2.3.0RC2
updated to latest RC2 because I may also need it and
the project is pretty much dead these days, so it might
take a while to decide on a release. (plus I submitted
pull request for warnings and report about more warnings)
beware of bugs and if you find any, report to libharu
developers. most important new stuff is partial unicode
(1-2 bytes UTF8) and PDF/A support. it also incorporates
our png patch, so local patching is minimal now.
; TODO: add hbhpdf wrappers for new functions not yet covered.
70 lines
1.5 KiB
C
70 lines
1.5 KiB
C
/*
|
|
* << Haru Free PDF Library >> -- hpdf_annotation.c
|
|
*
|
|
* URL: http://libharu.org
|
|
*
|
|
* Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
|
|
* Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org>
|
|
*
|
|
* Permission to use, copy, modify, distribute and sell this software
|
|
* and its documentation for any purpose is hereby granted without fee,
|
|
* provided that the above copyright notice appear in all copies and
|
|
* that both that copyright notice and this permission notice appear
|
|
* in supporting documentation.
|
|
* It is provided "as is" without express or implied warranty.
|
|
*
|
|
*/
|
|
|
|
#include "hpdfconf.h"
|
|
#include "hpdfutil.h"
|
|
#include "hpdfinfo.h"
|
|
#include "hpdfexda.h"
|
|
#include "hpdf.h"
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
/*------ HPDF_ExData -----------------------------------------------------*/
|
|
|
|
|
|
|
|
HPDF_ExData
|
|
HPDF_3DAnnotExData_New(HPDF_MMgr mmgr,
|
|
HPDF_Xref xref)
|
|
{
|
|
HPDF_ExData exdata;
|
|
HPDF_STATUS ret = HPDF_OK;
|
|
|
|
|
|
HPDF_PTRACE((" HPDF_ExData_New\n"));
|
|
|
|
exdata = HPDF_Dict_New (mmgr);
|
|
if (!exdata)
|
|
return NULL;
|
|
|
|
if (HPDF_Xref_Add (xref, exdata) != HPDF_OK)
|
|
return NULL;
|
|
|
|
ret += HPDF_Dict_AddName (exdata, "Type", "ExData");
|
|
ret += HPDF_Dict_AddName (exdata, "Subtype", "3DM");
|
|
|
|
if (ret != HPDF_OK)
|
|
return NULL;
|
|
|
|
return exdata;
|
|
}
|
|
|
|
|
|
|
|
HPDF_EXPORT(HPDF_STATUS)
|
|
HPDF_3DAnnotExData_Set3DMeasurement(HPDF_ExData exdata,
|
|
HPDF_3DMeasure measure)
|
|
{
|
|
HPDF_STATUS ret = HPDF_OK;
|
|
|
|
ret = HPDF_Dict_Add (exdata, "M3DREF", measure);
|
|
if (ret != HPDF_OK)
|
|
return ret;
|
|
|
|
return ret;
|
|
}
|
|
|