equal
deleted
inserted
replaced
49 |
49 |
50 |
50 |
51 /*! |
51 /*! |
52 \qmlclass Image QDeclarativeImage |
52 \qmlclass Image QDeclarativeImage |
53 \since 4.7 |
53 \since 4.7 |
|
54 \ingroup qml-vasic-visual-elements |
|
55 |
54 \brief The Image element allows you to add bitmaps to a scene. |
56 \brief The Image element allows you to add bitmaps to a scene. |
55 \inherits Item |
57 \inherits Item |
56 |
58 |
57 An Image element displays a specified \l source image: |
59 An Image element displays a specified \l source image: |
58 |
60 |
85 that images which do not form part of the user interface have their |
87 that images which do not form part of the user interface have their |
86 size bounded via the \l sourceSize property. This is especially important for content |
88 size bounded via the \l sourceSize property. This is especially important for content |
87 that is loaded from external sources or provided by the user. |
89 that is loaded from external sources or provided by the user. |
88 |
90 |
89 \sa {declarative/imageelements/image}{Image example}, QDeclarativeImageProvider |
91 \sa {declarative/imageelements/image}{Image example}, QDeclarativeImageProvider |
90 */ |
|
91 |
|
92 /*! |
|
93 \internal |
|
94 \class QDeclarativeImage Image |
|
95 \brief The QDeclarativeImage class provides an image item that you can add to a QDeclarativeView. |
|
96 |
|
97 Example: |
|
98 \qml |
|
99 Image { source: "pics/star.png" } |
|
100 \endqml |
|
101 |
|
102 A QDeclarativeImage object can be instantiated in QML using the tag \l Image. |
|
103 */ |
92 */ |
104 |
93 |
105 QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent) |
94 QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent) |
106 : QDeclarativeImageBase(*(new QDeclarativeImagePrivate), parent) |
95 : QDeclarativeImageBase(*(new QDeclarativeImagePrivate), parent) |
107 { |
96 { |
327 This property holds the actual width and height of the loaded image. |
316 This property holds the actual width and height of the loaded image. |
328 |
317 |
329 Unlike the \l {Item::}{width} and \l {Item::}{height} properties, which scale |
318 Unlike the \l {Item::}{width} and \l {Item::}{height} properties, which scale |
330 the painting of the image, this property sets the actual number of pixels |
319 the painting of the image, this property sets the actual number of pixels |
331 stored for the loaded image so that large images do not use more |
320 stored for the loaded image so that large images do not use more |
332 memory than necessary. For example, this ensures the image is memory is no |
321 memory than necessary. For example, this ensures the image in memory is no |
333 larger than 1024x1024 pixels, regardless of the Image's \l {Item::}{width} and |
322 larger than 1024x1024 pixels, regardless of the Image's \l {Item::}{width} and |
334 \l {Item::}{height} values: |
323 \l {Item::}{height} values: |
335 |
324 |
336 \code |
325 \code |
337 Rectangle { |
326 Rectangle { |