QML ShaderEffectSource ElementThe ShaderEffectSource object encapsulates the source content for the ShaderEffectItem. More... Properties
MethodsDetailed DescriptionShaderEffectSource is available in the Qt.labs.shaders 1.0 module. Elements in the Qt.labs module are not guaranteed to remain compatible in future versions. This element provides preliminary support for OpenGL shaders in QML, and may be heavily changed or removed in later versions. Requirement for the ability to use of shaders is that the application is either using opengl graphicssystem or has set QGLWidget as the viewport to QDeclarativeView (recommended way). ShaderEffectSource object encapsulates the source content so that it can be utilized in ShaderEffectItem. Source content can be a live QML object tree, or a snapshot of QML object tree. Property DocumentationThis property holds the flag to define whether the original source item is hidden when the effect item is drawn. The default value is false. This property holds the optimization flag to define whether the source item content is changing or static. If value true is assigned to this property, source item content is re-rendered into a texture for every frame. Setting the value to false improves the performance as it skips rendering the source item (and its chidleren) and instead immediately passes the previously rendered and cached texture to the shaders. The default value is true. This property holds the Item which is used as the source for the shader effect. If the item has children, those are included as well. Note: When source item content is passed to the ShaderEffectItem(s), it is always clipped to the boundingrect of the sourceItem regardless of its clipping property. This property can be used to specify margins for the source content. If other value than Qt.rect(0,0,0,0) is assigned to this property, it is interpreted as specifying a relative source rectangle for the source content. For example, setting Qt.rect(-10.0, -10.0, 120.0, 120.0) for a source that has width and height of 100 pixels would produce 10 pixels margins to each side of the source. Margins are useful when the original content is wanted to be spread outside the original source area, like when creating a dropshadow with the shader or in other similar effects. The default value is Qt.rect(0,0,0,0). This property defines the wrap parameter for the source after it has been mapped as a texture.
The default value is ClampToEdge. Method DocumentationRepaints the source item content into the texture. This method is useful when ShaderEffectSource::live has been set to false and the changes in the source item content is desired to be made visible for the shaders. |
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.8 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com