Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Side by Side Diff: xfa/include/fxgraphics/fx_graphics.h

Issue 1087053002: Merge to XFA: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/include/fxfa/fxfa_objectacc.h ('k') | xfa/src/fee/include/ifde_txtedtengine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef __H_FX_GRAPHICS__ 7 #ifndef __H_FX_GRAPHICS__
8 #define __H_FX_GRAPHICS__ 8 #define __H_FX_GRAPHICS__
9 #define FX_ERR_Succeeded 0 9 #define FX_ERR_Succeeded 0
10 #define FX_ERR_Indefinite -1 10 #define FX_ERR_Indefinite -1
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 FX_HATCHSTYLE_Trellis = 46, 87 FX_HATCHSTYLE_Trellis = 46,
88 FX_HATCHSTYLE_Sphere = 47, 88 FX_HATCHSTYLE_Sphere = 47,
89 FX_HATCHSTYLE_SmallGrid = 48, 89 FX_HATCHSTYLE_SmallGrid = 48,
90 FX_HATCHSTYLE_SmallCheckerBoard = 49, 90 FX_HATCHSTYLE_SmallCheckerBoard = 49,
91 FX_HATCHSTYLE_LargeCheckerBoard = 50, 91 FX_HATCHSTYLE_LargeCheckerBoard = 50,
92 FX_HATCHSTYLE_OutlinedDiamond = 51, 92 FX_HATCHSTYLE_OutlinedDiamond = 51,
93 FX_HATCHSTYLE_SolidDiamond = 52 93 FX_HATCHSTYLE_SolidDiamond = 52
94 }; 94 };
95 typedef FX_INT32 FX_DeviceCap; 95 typedef FX_INT32 FX_DeviceCap;
96 typedef FX_INT32 FX_FillMode; 96 typedef FX_INT32 FX_FillMode;
97 class CFX_Object;
98 class CFX_RenderDevice; 97 class CFX_RenderDevice;
99 class CFX_GraphStateData; 98 class CFX_GraphStateData;
100 class CFX_Matrix; 99 class CFX_Matrix;
101 class CFX_DIBSource; 100 class CFX_DIBSource;
102 class CFX_DIBitmap; 101 class CFX_DIBitmap;
103 class CFX_Font; 102 class CFX_Font;
104 class CFX_WideString; 103 class CFX_WideString;
105 class IFX_FileRead; 104 class IFX_FileRead;
106 class CFX_PathGenerator; 105 class CFX_PathGenerator;
107 class CAGG_Graphics; 106 class CAGG_Graphics;
108 class CFX_Graphics; 107 class CFX_Graphics;
109 class CFX_Color; 108 class CFX_Color;
110 class CFX_Path; 109 class CFX_Path;
111 class CFX_Pattern; 110 class CFX_Pattern;
112 class CFX_Shading; 111 class CFX_Shading;
113 class CFX_Graphics : public CFX_Object 112 class CFX_Graphics
114 { 113 {
115 public: 114 public:
116 115
117 116
118 CFX_Graphics(); 117 CFX_Graphics();
119 118
120 FX_ERR Create(CFX_RenderDevice * renderDevice, FX_BOOL isAntialiasing = TRUE ); 119 FX_ERR Create(CFX_RenderDevice * renderDevice, FX_BOOL isAntialiasing = TRUE );
121 120
122 FX_ERR Create(FX_INT32 width, 121 FX_ERR Create(FX_INT32 width,
123 FX_INT32 height, 122 FX_INT32 height,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 FX_ERR FillPathWithShading(CFX_Path * path, 287 FX_ERR FillPathWithShading(CFX_Path * path,
289 FX_FillMode fillMode, 288 FX_FillMode fillMode,
290 CFX_Matrix * matrix); 289 CFX_Matrix * matrix);
291 FX_ERR SetDIBitsWithMatrix(CFX_DIBSource * source, CFX_Matrix * matrix); 290 FX_ERR SetDIBitsWithMatrix(CFX_DIBSource * source, CFX_Matrix * matrix);
292 FX_ERR CalcTextInfo(const CFX_WideString & text, FX_DWORD * charCodes, FXTEX T_CHARPOS * charPos, CFX_RectF & rect); 291 FX_ERR CalcTextInfo(const CFX_WideString & text, FX_DWORD * charCodes, FXTEX T_CHARPOS * charPos, CFX_RectF & rect);
293 292
294 293
295 protected: 294 protected:
296 FX_INT32 _type; 295 FX_INT32 _type;
297 private: 296 private:
298 struct TInfo : public CFX_Object { 297 struct TInfo {
299 CFX_GraphStateData _graphState; 298 CFX_GraphStateData _graphState;
300 FX_BOOL _isAntialiasing; 299 FX_BOOL _isAntialiasing;
301 FX_StrokeAlignment _strokeAlignment; 300 FX_StrokeAlignment _strokeAlignment;
302 CFX_Matrix _CTM; 301 CFX_Matrix _CTM;
303 FX_BOOL _isActOnDash; 302 FX_BOOL _isActOnDash;
304 CFX_Color * _strokeColor; 303 CFX_Color * _strokeColor;
305 CFX_Color * _fillColor; 304 CFX_Color * _fillColor;
306 CFX_Font * _font; 305 CFX_Font * _font;
307 FX_FLOAT _fontSize; 306 FX_FLOAT _fontSize;
308 FX_FLOAT _fontHScale; 307 FX_FLOAT _fontHScale;
309 FX_FLOAT _fontSpacing; 308 FX_FLOAT _fontSpacing;
310 } _info; 309 } _info;
311 CFX_RenderDevice * _renderDevice; 310 CFX_RenderDevice * _renderDevice;
312 CFX_PtrArray _infoStack; 311 CFX_PtrArray _infoStack;
313 CAGG_Graphics * _aggGraphics; 312 CAGG_Graphics * _aggGraphics;
314 friend class CAGG_Graphics; 313 friend class CAGG_Graphics;
315 314
316 }; 315 };
317 class CFX_Path : public CFX_Object 316 class CFX_Path
318 { 317 {
319 public: 318 public:
320 319
321 320
322 CFX_Path(); 321 CFX_Path();
323 322
324 FX_ERR Create(); 323 FX_ERR Create();
325 324
326 virtual ~CFX_Path(); 325 virtual ~CFX_Path();
327 326
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 FX_ERR AddSubpath(CFX_Path * path); 380 FX_ERR AddSubpath(CFX_Path * path);
382 381
383 FX_ERR Clear(); 382 FX_ERR Clear();
384 383
385 FX_BOOL IsEmpty(); 384 FX_BOOL IsEmpty();
386 385
387 CFX_PathData * GetPathData(); 386 CFX_PathData * GetPathData();
388 private: 387 private:
389 CFX_PathGenerator * _generator; 388 CFX_PathGenerator * _generator;
390 }; 389 };
391 class CFX_Color : public CFX_Object 390 class CFX_Color
392 { 391 {
393 public: 392 public:
394 393
395 CFX_Color(); 394 CFX_Color();
396 395
397 CFX_Color(const FX_ARGB argb); 396 CFX_Color(const FX_ARGB argb);
398 397
399 398
400 CFX_Color(CFX_Pattern * pattern, const FX_ARGB argb = 0x0); 399 CFX_Color(CFX_Pattern * pattern, const FX_ARGB argb = 0x0);
401 400
(...skipping 17 matching lines...) Expand all
419 union { 418 union {
420 struct { 419 struct {
421 FX_ARGB _argb; 420 FX_ARGB _argb;
422 CFX_Pattern * _pattern; 421 CFX_Pattern * _pattern;
423 }; 422 };
424 CFX_Shading * _shading; 423 CFX_Shading * _shading;
425 }; 424 };
426 425
427 friend class CFX_Graphics; 426 friend class CFX_Graphics;
428 }; 427 };
429 class CFX_Pattern : public CFX_Object 428 class CFX_Pattern
430 { 429 {
431 public: 430 public:
432 431
433 432
434 CFX_Pattern(); 433 CFX_Pattern();
435 434
436 FX_ERR Create(CFX_DIBitmap * bitmap, 435 FX_ERR Create(CFX_DIBitmap * bitmap,
437 const FX_FLOAT xStep, 436 const FX_FLOAT xStep,
438 const FX_FLOAT yStep, 437 const FX_FLOAT yStep,
439 CFX_Matrix * matrix = NULL); 438 CFX_Matrix * matrix = NULL);
(...skipping 21 matching lines...) Expand all
461 FX_FLOAT _y1Step; 460 FX_FLOAT _y1Step;
462 }; 461 };
463 struct { 462 struct {
464 FX_HatchStyle _hatchStyle; 463 FX_HatchStyle _hatchStyle;
465 FX_ARGB _foreArgb; 464 FX_ARGB _foreArgb;
466 FX_ARGB _backArgb; 465 FX_ARGB _backArgb;
467 }; 466 };
468 }; 467 };
469 friend class CFX_Graphics; 468 friend class CFX_Graphics;
470 }; 469 };
471 class CFX_Shading : public CFX_Object 470 class CFX_Shading
472 { 471 {
473 public: 472 public:
474 473
475 474
476 CFX_Shading(); 475 CFX_Shading();
477 476
478 FX_ERR CreateAxial(const CFX_PointF & beginPoint, 477 FX_ERR CreateAxial(const CFX_PointF & beginPoint,
479 const CFX_PointF & endPoint, 478 const CFX_PointF & endPoint,
480 FX_BOOL isExtendedBegin, 479 FX_BOOL isExtendedBegin,
481 FX_BOOL isExtendedEnd, 480 FX_BOOL isExtendedEnd,
(...skipping 20 matching lines...) Expand all
502 FX_FLOAT _beginRadius; 501 FX_FLOAT _beginRadius;
503 FX_FLOAT _endRadius; 502 FX_FLOAT _endRadius;
504 FX_BOOL _isExtendedBegin; 503 FX_BOOL _isExtendedBegin;
505 FX_BOOL _isExtendedEnd; 504 FX_BOOL _isExtendedEnd;
506 FX_ARGB _beginArgb; 505 FX_ARGB _beginArgb;
507 FX_ARGB _endArgb; 506 FX_ARGB _endArgb;
508 FX_ARGB _argbArray[FX_SHADING_Steps]; 507 FX_ARGB _argbArray[FX_SHADING_Steps];
509 friend class CFX_Graphics; 508 friend class CFX_Graphics;
510 }; 509 };
511 #endif 510 #endif
OLDNEW
« no previous file with comments | « xfa/include/fxfa/fxfa_objectacc.h ('k') | xfa/src/fee/include/ifde_txtedtengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698