summaryrefslogtreecommitdiff
path: root/xfa/src/fdp/include/fde_img.h
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-10-28 23:03:33 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-11-03 11:10:11 -0800
commitfdc00a7042d912aafaabddae4d9c84199921ef23 (patch)
tree32ab8ac91cc68d2cd15b9168782a71b3f3f5e7b9 /xfa/src/fdp/include/fde_img.h
parente9b38fa38de2c95d8260be31c57d9272c4d127ed (diff)
downloadpdfium-fdc00a7042d912aafaabddae4d9c84199921ef23.tar.xz
Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
Diffstat (limited to 'xfa/src/fdp/include/fde_img.h')
-rw-r--r--xfa/src/fdp/include/fde_img.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/xfa/src/fdp/include/fde_img.h b/xfa/src/fdp/include/fde_img.h
new file mode 100644
index 0000000000..808bc4c304
--- /dev/null
+++ b/xfa/src/fdp/include/fde_img.h
@@ -0,0 +1,76 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef _FDE_IMAGE
+#define _FDE_IMAGE
+class IFDE_Image;
+#define FDE_IMAGEFORMAT_Unknown -1
+#define FDE_IMAGEFORMAT_BMP 0
+#define FDE_IMAGEFORMAT_GIF 1
+#define FDE_IMAGEFORMAT_JPEG 2
+#define FDE_IMAGEFORMAT_PNG 3
+#define FDE_IMAGEFORMAT_TIFF 4
+#define FDE_IMAGEFORMAT_JPEG2000 5
+#define FDE_IMAGEFORMAT_JBig2 6
+class IFDE_Image
+{
+public:
+ static IFDE_Image* Create(IFX_Stream *pStream, FX_INT32 iFormat = FDE_IMAGEFORMAT_Unknown);
+ virtual void Release() = 0;
+ virtual FX_BOOL LoadImage() = 0;
+ virtual void FreeImage() = 0;
+ virtual FX_INT32 CountFrames() const = 0;
+ virtual FX_BOOL LoadFrame(FX_INT32 index) = 0;
+ virtual CFX_DIBitmap* GetFrameImage() = 0;
+ virtual FX_INT32 GetImageFormat() const = 0;
+ virtual FX_INT32 GetImageWidth() const = 0;
+ virtual FX_INT32 GetImageHeight() const = 0;
+ virtual FX_INT32 GetDelayTime(FX_INT32 iFrameIndex) const = 0;
+ virtual FX_INT32 GetLoopCount() const = 0;
+ virtual FX_BOOL StartLoadImage(CFX_DIBitmap *pDIBitmap, FX_INT32 dibX, FX_INT32 dibY, FX_INT32 dibCX, FX_INT32 dibCY,
+ FX_INT32 imgX, FX_INT32 imgY, FX_INT32 imgCX, FX_INT32 imgCY, FX_INT32 iFrameIndex = 0) = 0;
+ virtual FX_INT32 DoLoadImage(IFX_Pause *pPause = NULL) = 0;
+ virtual void StopLoadImage() = 0;
+};
+#define FDE_IMAGEFILTER_Unknown -1
+#define FDE_IMAGEFILTER_Opacity 0
+#define FDE_IMAGEFILTER_GrayScale 1
+#define FDE_IMAGEFILTER_BlackWhite 2
+#define FDE_IMAGEFILTER_InvertColor 3
+#define FDE_IMAGEFILTER_TransparentColor 4
+#define FDE_IMAGEFILTER_MaskColor 5
+#define FDE_IMAGEFILTER_Brightness 6
+#define FDE_IMAGEFILTER_Contrast 7
+typedef struct _FDE_IMAGEFILTERPARAMS : public CFX_Target {
+ FX_INT32 iFilterType;
+} FDE_IMAGEFILTERPARAMS, * FDE_LPIMAGEFILTERPARAMS;
+typedef FDE_IMAGEFILTERPARAMS const * FDE_LPCIMAGEFILTERPARAMS;
+typedef struct _FDE_OPACITYPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_INT32 iOpacity;
+} FDE_OPACITYPARAMS, * FDE_LPOPACITYPARAMS;
+typedef FDE_OPACITYPARAMS const * FDE_LPCOPACITYPARAMS;
+typedef struct _FDE_BLACKWHITEPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_ARGB dwBlackColor;
+ FX_ARGB dwWhiteColor;
+} FDE_BLACKWHITEPARAMS, * FDE_LPBLACKWHITEPARAMS;
+typedef FDE_BLACKWHITEPARAMS const * FDE_LPCBLACKWHITEPARAMS;
+typedef struct _FDE_TRANSPARENTPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_ARGB color;
+} FDE_TRANSPARENTPARAMS, * FDE_LPTRANSPARENTPARAMS;
+typedef FDE_TRANSPARENTPARAMS const * FDE_LPCTRANSPARENTPARAMS;
+typedef struct _FDE_MASKCOLORPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_ARGB color;
+} FDE_MASKCOLORPARAMS, * FDE_LPMASKCOLORPARAMS;
+typedef FDE_MASKCOLORPARAMS const * FDE_LPCMASKCOLORPARAMS;
+typedef struct _FDE_BRIGHTNESSPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_INT32 iBrightness;
+} FDE_BRIGHTNESSPARAMS, * FDE_LPBRIGHTNESSPARAMS;
+typedef FDE_BRIGHTNESSPARAMS const * FDE_LPCBRIGHTNESSPARAMS;
+typedef struct _FDE_CONTRASTPARAMS : public FDE_IMAGEFILTERPARAMS {
+ FX_INT32 iContrast;
+} FDE_CONTRASTPARAMS, * FDE_LPCONTRASTPARAMS;
+typedef FDE_CONTRASTPARAMS const * FDE_LPCCONTRASTPARAMS;
+#endif