1 // Copyright 2016 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "core/fxge/renderdevicedriver_iface.h"
8
9 #include <utility>
10
11 #include "core/fxcrt/fx_coordinates.h"
12 #include "core/fxge/agg/cfx_agg_imagerenderer.h"
13 #include "core/fxge/cfx_path.h"
14 #include "core/fxge/dib/cfx_dibitmap.h"
15
16 RenderDeviceDriverIface::~RenderDeviceDriverIface() = default;
17
SetClip_PathStroke(const CFX_Path & path,const CFX_Matrix * pObject2Device,const CFX_GraphStateData * pGraphState)18 bool RenderDeviceDriverIface::SetClip_PathStroke(
19 const CFX_Path& path,
20 const CFX_Matrix* pObject2Device,
21 const CFX_GraphStateData* pGraphState) {
22 return false;
23 }
24
SetBaseClip(const FX_RECT & rect)25 void RenderDeviceDriverIface::SetBaseClip(const FX_RECT& rect) {}
26
FillRect(const FX_RECT & rect,uint32_t fill_color)27 bool RenderDeviceDriverIface::FillRect(const FX_RECT& rect,
28 uint32_t fill_color) {
29 return false;
30 }
31
DrawCosmeticLine(const CFX_PointF & ptMoveTo,const CFX_PointF & ptLineTo,uint32_t color)32 bool RenderDeviceDriverIface::DrawCosmeticLine(const CFX_PointF& ptMoveTo,
33 const CFX_PointF& ptLineTo,
34 uint32_t color) {
35 return false;
36 }
37
GetDIBits(RetainPtr<CFX_DIBitmap> bitmap,int left,int top) const38 bool RenderDeviceDriverIface::GetDIBits(RetainPtr<CFX_DIBitmap> bitmap,
39 int left,
40 int top) const {
41 return false;
42 }
43
GetBackDrop() const44 RetainPtr<const CFX_DIBitmap> RenderDeviceDriverIface::GetBackDrop() const {
45 return RetainPtr<const CFX_DIBitmap>();
46 }
47
ContinueDIBits(CFX_AggImageRenderer * handle,PauseIndicatorIface * pPause)48 bool RenderDeviceDriverIface::ContinueDIBits(CFX_AggImageRenderer* handle,
49 PauseIndicatorIface* pPause) {
50 return false;
51 }
52
DrawDeviceText(pdfium::span<const TextCharPos> pCharPos,CFX_Font * pFont,const CFX_Matrix & mtObject2Device,float font_size,uint32_t color,const CFX_TextRenderOptions & options)53 bool RenderDeviceDriverIface::DrawDeviceText(
54 pdfium::span<const TextCharPos> pCharPos,
55 CFX_Font* pFont,
56 const CFX_Matrix& mtObject2Device,
57 float font_size,
58 uint32_t color,
59 const CFX_TextRenderOptions& options) {
60 return false;
61 }
62
GetDriverType() const63 int RenderDeviceDriverIface::GetDriverType() const {
64 return 0;
65 }
66
67 #if defined(PDF_USE_SKIA)
DrawShading(const CPDF_ShadingPattern & pattern,const CFX_Matrix & matrix,const FX_RECT & clip_rect,int alpha)68 bool RenderDeviceDriverIface::DrawShading(const CPDF_ShadingPattern& pattern,
69 const CFX_Matrix& matrix,
70 const FX_RECT& clip_rect,
71 int alpha) {
72 return false;
73 }
74
SetBitsWithMask(RetainPtr<const CFX_DIBBase> bitmap,RetainPtr<const CFX_DIBBase> mask,int left,int top,float alpha,BlendMode blend_type)75 bool RenderDeviceDriverIface::SetBitsWithMask(
76 RetainPtr<const CFX_DIBBase> bitmap,
77 RetainPtr<const CFX_DIBBase> mask,
78 int left,
79 int top,
80 float alpha,
81 BlendMode blend_type) {
82 return false;
83 }
84
SetGroupKnockout(bool group_knockout)85 void RenderDeviceDriverIface::SetGroupKnockout(bool group_knockout) {}
86
SyncInternalBitmaps()87 void RenderDeviceDriverIface::SyncInternalBitmaps() {}
88 #endif // defined(PDF_USE_SKIA)
89
StartResult(Result result,std::unique_ptr<CFX_AggImageRenderer> agg_image_renderer)90 RenderDeviceDriverIface::StartResult::StartResult(
91 Result result,
92 std::unique_ptr<CFX_AggImageRenderer> agg_image_renderer)
93 : result(result), agg_image_renderer(std::move(agg_image_renderer)) {}
94
95 RenderDeviceDriverIface::StartResult::~StartResult() = default;
96