If you can't read please download the document
Upload
picker-weng
View
3.280
Download
0
Embed Size (px)
DESCRIPTION
2D Graphics. Description of 2D graphic operations in Qt4. In this Chapter, you can learn how to handle the graphic scenes, views, and items in the Qt program.
Citation preview
2. QPainter
3. drawPoints Line
4. drawLines PolyLine
5. QPainter (cont.)
6. drawRect 7. drawRoundRect 8. drawEllipse 9. QPainter (cont.)
10. drawChord 11. drawPie 12. QPainter (cont.)
13. DrawPixmap 14. DrawPath 15. Three Main Painter Setting
brush
font
16. QPainterPath
17. Workflow of Painting Path
18. Set render hint 19. Set painter path 20. Set painter setting for Painter object 21. Draw the path 22. Pen Style 23. Cap Style 24. Join Style 25. Brush Style 26. Gradient Fills
27. Radial 28. Conical 29. 30. Antialiasing 31. Antialiasing (cont.) 32. Window-Viewport Mechanism
33. Convert the logical coordinates into physical coordinates
34. World Transformation
How many transformations?
35. Scale 36. Rotate 37. Shear (ref. to Affine Transformations) 38. World Transformation (cont.) 39. Reuse the Transformation
40. QTimer Class
41. How to use it?
42. Connect its timeout() signal to the slots 43. Callstart() Result
44. QTimer Class (cont.)
45. QDateTime Class
46. For example,
47. time() 48. currentDateTime() Use of Gregorian and Julian Calendars 49. Rendering with QImage
50. Accuracy is more important than efficiency
51. How to paint by Qt's platform-independent graphics engine?
52. Perform the drawing using the QPainter 53. QPainter object (image) -> widget Exception
54. How to paint by Qt's platform-independent graphics engine? (cont.) Initializes the painter's pen, background, and font 55. Composition Mode
56. Graphics View
QGraphicsItem
QGraphicsView
57. Graphics View (cont.) 58.
QBrushes
59. Grouping Items
60. QGraphicsItemGroup 61. QGraphicsView 62. QgraphicsView's Render Engine
Optional
63. Coordinate System
Scene
Item
64. Coordinate System (cont.)
65. QGraphicsItem
66. Q_DECLARE_TR_FUNCTIONS
67. Want to use thetrfunction 68. itemChange
69. const QVariant &value A handler for updating the item's change 70. Callupdate()to schedule a repaint 71. prepareGeometrychange()
72. Ex:setText() 73. ItemChange (cont.) 74. QGraphicsItem::boundingRect()
Called by QGraphicsView 75. whether the item needs to be re-drawn 76. QGraphicsItem::shape ()
Called by QGraphicsView 77. Used to
78. Hit test 79. Select the Multiple Items
80. QGraphicsView::RubberBandDrag
81. Z-order of Views
82. bringToFront() 83. Change the Color
When the link is changed, callupdate() 84. QColor::name()
85. Zoom Factor
86. Describe the parameters needed to draw a QGraphicsItem 87. Animation Effect
88. QTimeLine
89. Printing
90. PDF format
Print the entire scene
Multiple pages printing
91. callnewPage()to advance to the next page Print the range
92. Printing (cont.)