#ifndef _FS_RENDER_C_H_
#define _FS_RENDER_C_H_

#ifdef __cplusplus
extern "C" {
#endif


#include <windows.h>


typedef enum _FSColorMode {
e_FSColorModeColorModeNormal = 0,
e_FSColorModeMappingGray = 1,
e_FSColorModeMapping = 2,
e_FSColorModeAlpha = 3,
e_FSColorModeForeground = 4,
}FSColorMode;



typedef enum _FSContentFlag {
e_FSRenderPage = 0x01,
e_FSRenderAnnot = 0x02,
e_FSRenderHighlight = 0x04,
e_FSRenderExceptHighlight = 0x08,
e_FSRenderScreen = 0x10,
}FSContentFlag;



typedef enum _FSColorModeForeground {
e_FSColorModeForegroundText = 0x01,
e_FSColorModeForegroundPath = 0x02,
e_FSColorModeForegroundBlackText = 0x04,
e_FSColorModeForegroundBlackPath = 0x08,
}FSColorModeForeground;



typedef enum _FSOrientationFlag {
e_FSPortrait  = 0,
e_FSLandscape = 1,
}FSOrientationFlag;


typedef struct _FSPrintDeviceSettingData {
  int device_width;
  int device_height;
  FSRectF device_margin;
  FSOrientationFlag orientation;
  int resolution;
  FS_UINT32 copies;
}FSPrintDeviceSettingData;

FSErrorCode FSDK_Renderer_Create(const FS_BITMAP_HANDLE bitmap, FS_BOOL is_rgb_order, FS_RENDERER_HANDLE* renderer_return_value);
FSErrorCode FSDK_Renderer_Create0(const FSPrintDeviceSettingData print_param, const wchar_t* dest_file_path, FS_RENDERER_HANDLE* renderer_return_value);
FSErrorCode FSDK_Renderer_Create1(HDC dc, FS_RENDERER_HANDLE* renderer_return_value);
FSErrorCode FSDK_Renderer_Create2(HDC dc, const wchar_t* printer_driver_name, FS_RENDERER_HANDLE* renderer_return_value);
FSErrorCode FSDK_Renderer_Release(FS_RENDERER_HANDLE renderer_handle);
FSErrorCode FSDK_Renderer_IsEmpty(FS_RENDERER_HANDLE renderer_handle, FS_BOOL* return_value);
FSErrorCode FSDK_Renderer_StartQuickRender(FS_RENDERER_HANDLE renderer_handle, const FS_PDFPAGE_HANDLE page, const FSMatrix matrix, FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_StartRender(FS_RENDERER_HANDLE renderer_handle, const FS_PDFPAGE_HANDLE page, const FSMatrix matrix, FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_StartRenderReflowPage(FS_RENDERER_HANDLE renderer_handle, const FS_REFLOWPAGE_HANDLE reflow_page, const FSMatrix matrix,
                                    FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_StartRenderXFAPage(FS_RENDERER_HANDLE renderer_handle, const FS_XFAPAGE_HANDLE xfa_page_view, const FSMatrix matrix, FS_BOOL is_highlight,
                                 FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_StartRenderBitmap(FS_RENDERER_HANDLE renderer_handle, const FS_BITMAP_HANDLE bitmap, const FSMatrix matrix,
                                const FSRectI* clip_rect, FS_UINT32 interpolation,
                                FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_StartRenderBitmap0(FS_RENDERER_HANDLE renderer_handle, const FS_BITMAP_HANDLE bitmap, const FSMatrix matrix,
                                const FSRectI* clip_rect, FS_UINT32 interpolation,
                                FS_UINT32 alpha, FSPauseCallback* pause, FS_PROGRESSIVE_HANDLE* return_value);
FSErrorCode FSDK_Renderer_SetRenderAnnotAppearanceType(FS_RENDERER_HANDLE renderer_handle,  FSAppearanceType ap_type);
FSErrorCode FSDK_Renderer_RenderAnnot(FS_RENDERER_HANDLE renderer_handle, const FS_ANNOT_HANDLE annot, const FSMatrix matrix, FS_BOOL* return_value);
FSErrorCode FSDK_Renderer_RenderFormControls(FS_RENDERER_HANDLE renderer_handle, const FS_PDFPAGE_HANDLE page, const FSMatrix matrix, FS_BOOL* return_value);
FSErrorCode FSDK_Renderer_RenderGraphicsObject(FS_RENDERER_HANDLE renderer_handle, const FS_GRAPHICSOBJECT_HANDLE graphics_object, const FS_PDFPAGE_HANDLE page, const FSMatrix matrix, FS_BOOL* return_value);
FSErrorCode FSDK_Renderer_SetClipRect(FS_RENDERER_HANDLE renderer_handle, const FSRectI* clip_rect);
FSErrorCode FSDK_Renderer_ClearClips(FS_RENDERER_HANDLE renderer_handle);
FSErrorCode FSDK_Renderer_SetClipPathFill(FS_RENDERER_HANDLE renderer_handle, const FS_PATH_HANDLE clip_path, const FSMatrix matrix, FSFillMode fill_mode);
FSErrorCode FSDK_Renderer_SetClipPathStroke(FS_RENDERER_HANDLE renderer_handle, const FS_PATH_HANDLE clip_path, const FSMatrix matrix, const FSGraphState* graph_state);
FSErrorCode FSDK_Renderer_SetRenderContentFlags(FS_RENDERER_HANDLE renderer_handle, FS_UINT32 render_content_flags);
FSErrorCode FSDK_Renderer_SetRenderAnnotsForThumbnail(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_annots_for_thumbnail);
FSErrorCode FSDK_Renderer_SetRenderFormField(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_formfield);
FSErrorCode FSDK_Renderer_SetRenderSignature(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_signature);
FSErrorCode FSDK_Renderer_SetLayerContext(FS_RENDERER_HANDLE renderer_handle, const FS_LAYERCONTEXT_HANDLE layer_context);
FSErrorCode FSDK_Renderer_SetRenderLayer(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_one_layer);
FSErrorCode FSDK_Renderer_SetColorMode(FS_RENDERER_HANDLE renderer_handle, FSColorMode color_mode);
FSErrorCode FSDK_Renderer_SetMappingModeColors(FS_RENDERER_HANDLE renderer_handle, FSDK_ARGB background_color, FSDK_ARGB foreground_color);
FSErrorCode FSDK_Renderer_SetForegroundColorMode(FS_RENDERER_HANDLE renderer_handle, FS_UINT32 foreground_color_mode);
FSErrorCode FSDK_Renderer_SetForegroundColor(FS_RENDERER_HANDLE renderer_handle, FSDK_ARGB foreground_color);
FSErrorCode FSDK_Renderer_SetClearType(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_clear_type);
FSErrorCode FSDK_Renderer_SetPrintTextAsGraphic(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_to_print_text_graphic);
FSErrorCode FSDK_Renderer_SetPrintTextAsImage(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_to_print_text_image);
FSErrorCode FSDK_Renderer_SetForceDownSample(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_to_force_down_sample);
FSErrorCode FSDK_Renderer_SetOverprint(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_to_enable_overprint);
FSErrorCode FSDK_Renderer_SetJPEGDownSample(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_jepg_down_sample);
FSErrorCode FSDK_Renderer_SetJPXDownSample(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_jpx_down_sample);
FSErrorCode FSDK_Renderer_EnableForPrint(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_for_print);
FSErrorCode FSDK_Renderer_SetForceHalftone(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_to_force_halftone);
FSErrorCode FSDK_Renderer_SetRenderPathThinLine(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_path_thin_line);
FSErrorCode FSDK_Renderer_SetRenderTextAntiAliasing(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_text_antialiasing);
FSErrorCode FSDK_Renderer_SetRenderPathAntiAliasing(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_path_antialiasing);
FSErrorCode FSDK_Renderer_SetRenderPathFullCovered(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_path_full_covered);
FSErrorCode FSDK_Renderer_SetRenderImageAntiAliasing(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_image_antialiasing);
FSErrorCode FSDK_Renderer_SetRenderEnhanceThinLines(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_enhance_thin_lines);
FSErrorCode FSDK_Renderer_SetRenderSignatureState(FS_RENDERER_HANDLE renderer_handle, FS_BOOL is_render_signature_state);
FSErrorCode FSDK_Renderer_SetScreenDPIScale(FS_RENDERER_HANDLE renderer_handle, float scale);
#ifdef __cplusplus
}
#endif
#endif
