예제 #1
0
        /// <summary>
        /// Renders this <see cref="WebView"/> into an offscreen pixel buffer and clears the dirty state.
        /// </summary>
        /// <remarks>
        /// For maximum efficiency, you should only call this when the <see cref="WebView"/> is dirty 
        /// (see <see cref="IsDirty"/>).
        /// <p/>
        /// <note type="tip">
        /// The most appropriate time to call this method, is from within your <see cref="IsDirtyChanged"/> handler.
        /// </note>
        /// </remarks>
        /// <returns>
        /// An instance of the <see cref="RenderBuffer"/> that this <see cref="WebView"/> was rendered to. 
        /// This value may change between renders and may return null if the <see cref="WebView"/> has crashed
        /// (see <see cref="IsCrashed"/>).
        /// </returns>
        /// <exception cref="InvalidOperationException">
        /// The member is called on an invalid <see cref="WebView"/> instance
        /// (see <see cref="IsEnabled"/>).
        /// </exception>
        public RenderBuffer Render()
        {
            VerifyValid();
            RenderBuffer buffer = new RenderBuffer( awe_webview_render( Instance ) );

            if ( flushAlpha && ( buffer != null ) )
                buffer.FlushAlpha();

            return buffer;
        }