OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fde/fde_gedevice.h" | 7 #include "xfa/fde/fde_gedevice.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "xfa/fde/fde_geobject.h" | 11 #include "xfa/fde/cfde_path.h" |
12 #include "xfa/fde/fde_object.h" | 12 #include "xfa/fde/fde_object.h" |
| 13 #include "xfa/fgas/font/fgas_font.h" |
13 | 14 |
14 IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_DIBitmap* pBitmap, | 15 CFDE_RenderDevice::CFDE_RenderDevice(CFX_RenderDevice* pDevice, |
15 FX_BOOL bRgbByteOrder) { | 16 FX_BOOL bOwnerDevice) |
16 if (pBitmap == NULL) { | |
17 return NULL; | |
18 } | |
19 CFX_FxgeDevice* pDevice = new CFX_FxgeDevice; | |
20 pDevice->Attach(pBitmap, 0, bRgbByteOrder); | |
21 return new CFDE_FxgeDevice(pDevice, TRUE); | |
22 } | |
23 IFDE_RenderDevice* IFDE_RenderDevice::Create(CFX_RenderDevice* pDevice) { | |
24 return pDevice ? new CFDE_FxgeDevice(pDevice, FALSE) : nullptr; | |
25 } | |
26 CFDE_FxgeDevice::CFDE_FxgeDevice(CFX_RenderDevice* pDevice, | |
27 FX_BOOL bOwnerDevice) | |
28 : m_pDevice(pDevice), | 17 : m_pDevice(pDevice), |
29 m_bOwnerDevice(bOwnerDevice), | 18 m_bOwnerDevice(bOwnerDevice), |
30 m_pCharPos(NULL), | 19 m_pCharPos(nullptr), |
31 m_iCharCount(0) { | 20 m_iCharCount(0) { |
32 FXSYS_assert(pDevice != NULL); | 21 FXSYS_assert(pDevice); |
| 22 |
33 FX_RECT rt = m_pDevice->GetClipBox(); | 23 FX_RECT rt = m_pDevice->GetClipBox(); |
34 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), | 24 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), |
35 (FX_FLOAT)rt.Height()); | 25 (FX_FLOAT)rt.Height()); |
36 } | 26 } |
37 CFDE_FxgeDevice::~CFDE_FxgeDevice() { | 27 |
| 28 CFDE_RenderDevice::~CFDE_RenderDevice() { |
38 FX_Free(m_pCharPos); | 29 FX_Free(m_pCharPos); |
39 if (m_bOwnerDevice) | 30 if (m_bOwnerDevice) |
40 delete m_pDevice; | 31 delete m_pDevice; |
41 } | 32 } |
42 int32_t CFDE_FxgeDevice::GetWidth() const { | 33 int32_t CFDE_RenderDevice::GetWidth() const { |
43 return m_pDevice->GetWidth(); | 34 return m_pDevice->GetWidth(); |
44 } | 35 } |
45 int32_t CFDE_FxgeDevice::GetHeight() const { | 36 int32_t CFDE_RenderDevice::GetHeight() const { |
46 return m_pDevice->GetHeight(); | 37 return m_pDevice->GetHeight(); |
47 } | 38 } |
48 FDE_HDEVICESTATE CFDE_FxgeDevice::SaveState() { | 39 FDE_HDEVICESTATE CFDE_RenderDevice::SaveState() { |
49 m_pDevice->SaveState(); | 40 m_pDevice->SaveState(); |
50 return NULL; | 41 return NULL; |
51 } | 42 } |
52 void CFDE_FxgeDevice::RestoreState(FDE_HDEVICESTATE hState) { | 43 void CFDE_RenderDevice::RestoreState(FDE_HDEVICESTATE hState) { |
53 m_pDevice->RestoreState(); | 44 m_pDevice->RestoreState(); |
54 const FX_RECT& rt = m_pDevice->GetClipBox(); | 45 const FX_RECT& rt = m_pDevice->GetClipBox(); |
55 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), | 46 m_rtClip.Set((FX_FLOAT)rt.left, (FX_FLOAT)rt.top, (FX_FLOAT)rt.Width(), |
56 (FX_FLOAT)rt.Height()); | 47 (FX_FLOAT)rt.Height()); |
57 } | 48 } |
58 FX_BOOL CFDE_FxgeDevice::SetClipRect(const CFX_RectF& rtClip) { | 49 FX_BOOL CFDE_RenderDevice::SetClipRect(const CFX_RectF& rtClip) { |
59 m_rtClip = rtClip; | 50 m_rtClip = rtClip; |
60 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), | 51 return m_pDevice->SetClip_Rect(FX_RECT((int32_t)FXSYS_floor(rtClip.left), |
61 (int32_t)FXSYS_floor(rtClip.top), | 52 (int32_t)FXSYS_floor(rtClip.top), |
62 (int32_t)FXSYS_ceil(rtClip.right()), | 53 (int32_t)FXSYS_ceil(rtClip.right()), |
63 (int32_t)FXSYS_ceil(rtClip.bottom()))); | 54 (int32_t)FXSYS_ceil(rtClip.bottom()))); |
64 } | 55 } |
65 const CFX_RectF& CFDE_FxgeDevice::GetClipRect() { | 56 const CFX_RectF& CFDE_RenderDevice::GetClipRect() { |
66 return m_rtClip; | 57 return m_rtClip; |
67 } | 58 } |
68 FX_BOOL CFDE_FxgeDevice::SetClipPath(const IFDE_Path* pClip) { | 59 FX_BOOL CFDE_RenderDevice::SetClipPath(const CFDE_Path* pClip) { |
69 return FALSE; | 60 return FALSE; |
70 } | 61 } |
71 IFDE_Path* CFDE_FxgeDevice::GetClipPath() const { | 62 CFDE_Path* CFDE_RenderDevice::GetClipPath() const { |
72 return NULL; | 63 return NULL; |
73 } | 64 } |
74 FX_FLOAT CFDE_FxgeDevice::GetDpiX() const { | 65 FX_FLOAT CFDE_RenderDevice::GetDpiX() const { |
75 return 96; | 66 return 96; |
76 } | 67 } |
77 FX_FLOAT CFDE_FxgeDevice::GetDpiY() const { | 68 FX_FLOAT CFDE_RenderDevice::GetDpiY() const { |
78 return 96; | 69 return 96; |
79 } | 70 } |
80 FX_BOOL CFDE_FxgeDevice::DrawImage(CFX_DIBSource* pDib, | 71 FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib, |
81 const CFX_RectF* pSrcRect, | 72 const CFX_RectF* pSrcRect, |
82 const CFX_RectF& dstRect, | 73 const CFX_RectF& dstRect, |
83 const CFX_Matrix* pImgMatrix, | 74 const CFX_Matrix* pImgMatrix, |
84 const CFX_Matrix* pDevMatrix) { | 75 const CFX_Matrix* pDevMatrix) { |
85 FXSYS_assert(pDib != NULL); | 76 FXSYS_assert(pDib != NULL); |
86 CFX_RectF srcRect; | 77 CFX_RectF srcRect; |
87 if (pSrcRect) { | 78 if (pSrcRect) { |
88 srcRect = *pSrcRect; | 79 srcRect = *pSrcRect; |
89 } else { | 80 } else { |
90 srcRect.Set(0, 0, (FX_FLOAT)pDib->GetWidth(), (FX_FLOAT)pDib->GetHeight()); | 81 srcRect.Set(0, 0, (FX_FLOAT)pDib->GetWidth(), (FX_FLOAT)pDib->GetHeight()); |
91 } | 82 } |
92 if (srcRect.IsEmpty()) { | 83 if (srcRect.IsEmpty()) { |
93 return FALSE; | 84 return FALSE; |
94 } | 85 } |
(...skipping 11 matching lines...) Expand all Loading... |
106 dib2fxdev.Concat(*pDevMatrix); | 97 dib2fxdev.Concat(*pDevMatrix); |
107 } | 98 } |
108 void* handle = NULL; | 99 void* handle = NULL; |
109 m_pDevice->StartDIBits(pDib, 255, 0, (const CFX_Matrix*)&dib2fxdev, 0, | 100 m_pDevice->StartDIBits(pDib, 255, 0, (const CFX_Matrix*)&dib2fxdev, 0, |
110 handle); | 101 handle); |
111 while (m_pDevice->ContinueDIBits(handle, NULL)) { | 102 while (m_pDevice->ContinueDIBits(handle, NULL)) { |
112 } | 103 } |
113 m_pDevice->CancelDIBits(handle); | 104 m_pDevice->CancelDIBits(handle); |
114 return handle != NULL; | 105 return handle != NULL; |
115 } | 106 } |
116 FX_BOOL CFDE_FxgeDevice::DrawString(CFDE_Brush* pBrush, | 107 FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush, |
117 IFX_Font* pFont, | 108 IFX_Font* pFont, |
118 const FXTEXT_CHARPOS* pCharPos, | 109 const FXTEXT_CHARPOS* pCharPos, |
119 int32_t iCount, | 110 int32_t iCount, |
120 FX_FLOAT fFontSize, | 111 FX_FLOAT fFontSize, |
121 const CFX_Matrix* pMatrix) { | 112 const CFX_Matrix* pMatrix) { |
122 FXSYS_assert(pBrush != NULL && pFont != NULL && pCharPos != NULL && | 113 FXSYS_assert(pBrush != NULL && pFont != NULL && pCharPos != NULL && |
123 iCount > 0); | 114 iCount > 0); |
124 CFX_FontCache* pCache = CFX_GEModule::Get()->GetFontCache(); | 115 CFX_FontCache* pCache = CFX_GEModule::Get()->GetFontCache(); |
125 CFX_Font* pFxFont = (CFX_Font*)pFont->GetDevFont(); | 116 CFX_Font* pFxFont = (CFX_Font*)pFont->GetDevFont(); |
126 | 117 |
127 FX_ARGB argb = pBrush->GetColor(); | 118 FX_ARGB argb = pBrush->GetColor(); |
128 if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 && | 119 if ((pFont->GetFontStyles() & FX_FONTSTYLE_Italic) != 0 && |
129 !pFxFont->IsItalic()) { | 120 !pFxFont->IsItalic()) { |
130 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; | 121 FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos; |
131 FX_FLOAT* pAM; | 122 FX_FLOAT* pAM; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 191 } |
201 | 192 |
202 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 193 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
203 FxFont.SetSubstFont(nullptr); | 194 FxFont.SetSubstFont(nullptr); |
204 FxFont.SetFace(nullptr); | 195 FxFont.SetFace(nullptr); |
205 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 196 #endif // _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
206 | 197 |
207 return TRUE; | 198 return TRUE; |
208 } | 199 } |
209 | 200 |
210 FX_BOOL CFDE_FxgeDevice::DrawBezier(CFDE_Pen* pPen, | 201 FX_BOOL CFDE_RenderDevice::DrawBezier(CFDE_Pen* pPen, |
211 FX_FLOAT fPenWidth, | 202 FX_FLOAT fPenWidth, |
212 const CFX_PointF& pt1, | 203 const CFX_PointF& pt1, |
213 const CFX_PointF& pt2, | 204 const CFX_PointF& pt2, |
214 const CFX_PointF& pt3, | 205 const CFX_PointF& pt3, |
215 const CFX_PointF& pt4, | 206 const CFX_PointF& pt4, |
216 const CFX_Matrix* pMatrix) { | 207 const CFX_Matrix* pMatrix) { |
217 CFX_PointsF points; | 208 CFX_PointsF points; |
218 points.Add(pt1); | 209 points.Add(pt1); |
219 points.Add(pt2); | 210 points.Add(pt2); |
220 points.Add(pt3); | 211 points.Add(pt3); |
221 points.Add(pt4); | 212 points.Add(pt4); |
222 CFDE_Path path; | 213 CFDE_Path path; |
223 path.AddBezier(points); | 214 path.AddBezier(points); |
224 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 215 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
225 } | 216 } |
226 FX_BOOL CFDE_FxgeDevice::DrawCurve(CFDE_Pen* pPen, | 217 FX_BOOL CFDE_RenderDevice::DrawCurve(CFDE_Pen* pPen, |
227 FX_FLOAT fPenWidth, | 218 FX_FLOAT fPenWidth, |
228 const CFX_PointsF& points, | 219 const CFX_PointsF& points, |
229 FX_BOOL bClosed, | 220 FX_BOOL bClosed, |
230 FX_FLOAT fTension, | 221 FX_FLOAT fTension, |
231 const CFX_Matrix* pMatrix) { | 222 const CFX_Matrix* pMatrix) { |
232 CFDE_Path path; | 223 CFDE_Path path; |
233 path.AddCurve(points, bClosed, fTension); | 224 path.AddCurve(points, bClosed, fTension); |
234 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 225 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
235 } | 226 } |
236 FX_BOOL CFDE_FxgeDevice::DrawEllipse(CFDE_Pen* pPen, | 227 FX_BOOL CFDE_RenderDevice::DrawEllipse(CFDE_Pen* pPen, |
237 FX_FLOAT fPenWidth, | 228 FX_FLOAT fPenWidth, |
238 const CFX_RectF& rect, | 229 const CFX_RectF& rect, |
239 const CFX_Matrix* pMatrix) { | 230 const CFX_Matrix* pMatrix) { |
240 CFDE_Path path; | 231 CFDE_Path path; |
241 path.AddEllipse(rect); | 232 path.AddEllipse(rect); |
242 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 233 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
243 } | 234 } |
244 FX_BOOL CFDE_FxgeDevice::DrawLines(CFDE_Pen* pPen, | 235 FX_BOOL CFDE_RenderDevice::DrawLines(CFDE_Pen* pPen, |
245 FX_FLOAT fPenWidth, | 236 FX_FLOAT fPenWidth, |
246 const CFX_PointsF& points, | 237 const CFX_PointsF& points, |
247 const CFX_Matrix* pMatrix) { | 238 const CFX_Matrix* pMatrix) { |
248 CFDE_Path path; | 239 CFDE_Path path; |
249 path.AddLines(points); | 240 path.AddLines(points); |
250 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 241 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
251 } | 242 } |
252 FX_BOOL CFDE_FxgeDevice::DrawLine(CFDE_Pen* pPen, | 243 FX_BOOL CFDE_RenderDevice::DrawLine(CFDE_Pen* pPen, |
253 FX_FLOAT fPenWidth, | 244 FX_FLOAT fPenWidth, |
254 const CFX_PointF& pt1, | 245 const CFX_PointF& pt1, |
255 const CFX_PointF& pt2, | 246 const CFX_PointF& pt2, |
256 const CFX_Matrix* pMatrix) { | 247 const CFX_Matrix* pMatrix) { |
257 CFDE_Path path; | 248 CFDE_Path path; |
258 path.AddLine(pt1, pt2); | 249 path.AddLine(pt1, pt2); |
259 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 250 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
260 } | 251 } |
261 FX_BOOL CFDE_FxgeDevice::DrawPath(CFDE_Pen* pPen, | 252 FX_BOOL CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen, |
262 FX_FLOAT fPenWidth, | 253 FX_FLOAT fPenWidth, |
263 const IFDE_Path* pPath, | 254 const CFDE_Path* pPath, |
264 const CFX_Matrix* pMatrix) { | 255 const CFX_Matrix* pMatrix) { |
265 CFDE_Path* pGePath = (CFDE_Path*)pPath; | 256 CFDE_Path* pGePath = (CFDE_Path*)pPath; |
266 if (pGePath == NULL) { | 257 if (pGePath == NULL) { |
267 return FALSE; | 258 return FALSE; |
268 } | 259 } |
269 CFX_GraphStateData graphState; | 260 CFX_GraphStateData graphState; |
270 if (!CreatePen(pPen, fPenWidth, graphState)) { | 261 if (!CreatePen(pPen, fPenWidth, graphState)) { |
271 return FALSE; | 262 return FALSE; |
272 } | 263 } |
273 return m_pDevice->DrawPath(&pGePath->m_Path, (const CFX_Matrix*)pMatrix, | 264 return m_pDevice->DrawPath(&pGePath->m_Path, (const CFX_Matrix*)pMatrix, |
274 &graphState, 0, pPen->GetColor(), 0); | 265 &graphState, 0, pPen->GetColor(), 0); |
275 } | 266 } |
276 FX_BOOL CFDE_FxgeDevice::DrawPolygon(CFDE_Pen* pPen, | 267 FX_BOOL CFDE_RenderDevice::DrawPolygon(CFDE_Pen* pPen, |
277 FX_FLOAT fPenWidth, | 268 FX_FLOAT fPenWidth, |
278 const CFX_PointsF& points, | 269 const CFX_PointsF& points, |
279 const CFX_Matrix* pMatrix) { | 270 const CFX_Matrix* pMatrix) { |
280 CFDE_Path path; | 271 CFDE_Path path; |
281 path.AddPolygon(points); | 272 path.AddPolygon(points); |
282 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 273 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
283 } | 274 } |
284 FX_BOOL CFDE_FxgeDevice::DrawRectangle(CFDE_Pen* pPen, | 275 FX_BOOL CFDE_RenderDevice::DrawRectangle(CFDE_Pen* pPen, |
285 FX_FLOAT fPenWidth, | 276 FX_FLOAT fPenWidth, |
286 const CFX_RectF& rect, | 277 const CFX_RectF& rect, |
287 const CFX_Matrix* pMatrix) { | 278 const CFX_Matrix* pMatrix) { |
288 CFDE_Path path; | 279 CFDE_Path path; |
289 path.AddRectangle(rect); | 280 path.AddRectangle(rect); |
290 return DrawPath(pPen, fPenWidth, &path, pMatrix); | 281 return DrawPath(pPen, fPenWidth, &path, pMatrix); |
291 } | 282 } |
292 FX_BOOL CFDE_FxgeDevice::FillClosedCurve(CFDE_Brush* pBrush, | 283 FX_BOOL CFDE_RenderDevice::FillClosedCurve(CFDE_Brush* pBrush, |
293 const CFX_PointsF& points, | 284 const CFX_PointsF& points, |
294 FX_FLOAT fTension, | 285 FX_FLOAT fTension, |
295 const CFX_Matrix* pMatrix) { | 286 const CFX_Matrix* pMatrix) { |
296 CFDE_Path path; | 287 CFDE_Path path; |
297 path.AddCurve(points, TRUE, fTension); | 288 path.AddCurve(points, TRUE, fTension); |
298 return FillPath(pBrush, &path, pMatrix); | 289 return FillPath(pBrush, &path, pMatrix); |
299 } | 290 } |
300 FX_BOOL CFDE_FxgeDevice::FillEllipse(CFDE_Brush* pBrush, | 291 FX_BOOL CFDE_RenderDevice::FillEllipse(CFDE_Brush* pBrush, |
301 const CFX_RectF& rect, | 292 const CFX_RectF& rect, |
302 const CFX_Matrix* pMatrix) { | 293 const CFX_Matrix* pMatrix) { |
303 CFDE_Path path; | 294 CFDE_Path path; |
304 path.AddEllipse(rect); | 295 path.AddEllipse(rect); |
305 return FillPath(pBrush, &path, pMatrix); | 296 return FillPath(pBrush, &path, pMatrix); |
306 } | 297 } |
307 FX_BOOL CFDE_FxgeDevice::FillPolygon(CFDE_Brush* pBrush, | 298 FX_BOOL CFDE_RenderDevice::FillPolygon(CFDE_Brush* pBrush, |
308 const CFX_PointsF& points, | 299 const CFX_PointsF& points, |
309 const CFX_Matrix* pMatrix) { | 300 const CFX_Matrix* pMatrix) { |
310 CFDE_Path path; | 301 CFDE_Path path; |
311 path.AddPolygon(points); | 302 path.AddPolygon(points); |
312 return FillPath(pBrush, &path, pMatrix); | 303 return FillPath(pBrush, &path, pMatrix); |
313 } | 304 } |
314 FX_BOOL CFDE_FxgeDevice::FillRectangle(CFDE_Brush* pBrush, | 305 FX_BOOL CFDE_RenderDevice::FillRectangle(CFDE_Brush* pBrush, |
315 const CFX_RectF& rect, | 306 const CFX_RectF& rect, |
316 const CFX_Matrix* pMatrix) { | 307 const CFX_Matrix* pMatrix) { |
317 CFDE_Path path; | 308 CFDE_Path path; |
318 path.AddRectangle(rect); | 309 path.AddRectangle(rect); |
319 return FillPath(pBrush, &path, pMatrix); | 310 return FillPath(pBrush, &path, pMatrix); |
320 } | 311 } |
321 FX_BOOL CFDE_FxgeDevice::CreatePen(CFDE_Pen* pPen, | 312 FX_BOOL CFDE_RenderDevice::CreatePen(CFDE_Pen* pPen, |
322 FX_FLOAT fPenWidth, | 313 FX_FLOAT fPenWidth, |
323 CFX_GraphStateData& graphState) { | 314 CFX_GraphStateData& graphState) { |
324 if (!pPen) | 315 if (!pPen) |
325 return FALSE; | 316 return FALSE; |
326 | 317 |
327 graphState.m_LineCap = CFX_GraphStateData::LineCapButt; | 318 graphState.m_LineCap = CFX_GraphStateData::LineCapButt; |
328 graphState.m_LineJoin = CFX_GraphStateData::LineJoinMiter; | 319 graphState.m_LineJoin = CFX_GraphStateData::LineJoinMiter; |
329 graphState.m_LineWidth = fPenWidth; | 320 graphState.m_LineWidth = fPenWidth; |
330 graphState.m_MiterLimit = 10; | 321 graphState.m_MiterLimit = 10; |
331 graphState.m_DashPhase = 0; | 322 graphState.m_DashPhase = 0; |
332 return TRUE; | 323 return TRUE; |
333 } | 324 } |
334 | 325 |
335 FX_BOOL CFDE_FxgeDevice::FillPath(CFDE_Brush* pBrush, | 326 FX_BOOL CFDE_RenderDevice::FillPath(CFDE_Brush* pBrush, |
336 const IFDE_Path* pPath, | 327 const CFDE_Path* pPath, |
337 const CFX_Matrix* pMatrix) { | 328 const CFX_Matrix* pMatrix) { |
338 CFDE_Path* pGePath = (CFDE_Path*)pPath; | 329 CFDE_Path* pGePath = (CFDE_Path*)pPath; |
339 if (!pGePath) | 330 if (!pGePath) |
340 return FALSE; | 331 return FALSE; |
341 if (!pBrush) | 332 if (!pBrush) |
342 return FALSE; | 333 return FALSE; |
343 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, | 334 return m_pDevice->DrawPath(&pGePath->m_Path, pMatrix, nullptr, |
344 pBrush->GetColor(), 0, FXFILL_WINDING); | 335 pBrush->GetColor(), 0, FXFILL_WINDING); |
345 } | 336 } |
346 | 337 |
OLD | NEW |