BitmapSurface ClassAwesomium.NET 1.7.6Awesomium.NET
Represents the default surface used with WebView instances. It is a basic bitmap that keeps track of whether or not it has changed since the last time you called CopyTo(IntPtr, Int32, Int32, Boolean, Boolean).
Inheritance Hierarchy

SystemObject
  Awesomium.CoreViewModel
    Awesomium.CoreNativeViewModel
      Awesomium.CoreSurface
        Awesomium.CoreBitmapSurface

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

public sealed class BitmapSurface : Surface

The BitmapSurface type exposes the following members.

Constructors

  NameDescription
Public methodBitmapSurface
Creates a BitmapSurface instance of a specified size.
Top
Methods

  NameDescription
Public methodCopyTo
Copies this bitmap to a certain destination. This will also set IsDirty to false.
Public methodDispose
Perform cleanup of managed resources.
(Inherited from Surface.)
Protected methodFinalize (Inherited from NativeViewModel.)
Public methodGetAlphaAtPoint
Gets the opacity (0-255) of a certain point (in pixels).
Protected methodInitialize
Called when the size of the view has changed and the surface needs to be re-initialized.
(Overrides SurfaceInitialize(IWebView, Int32, Int32).)
Protected methodOnDispose
Called when an instance of this class is being disposed.
(Inherited from Surface.)
Protected methodOnInitialized
Triggers the Initialized event.
(Inherited from Surface.)
Protected methodOnPropertyChanged
Triggers the PropertyChanged event.
(Inherited from ViewModel.)
Protected methodOnResized
Triggers the Resized event.
(Inherited from Surface.)
Protected methodOnUpdated
Triggers the Updated event.
(Inherited from Surface.)
Protected methodPaint
This method is called whenever the IWebView instance this surface is assigned to, wants to paint a certain section of the Surface with a block of pixels. It is your responsibility to copy srcBuffer to the location in this Surface specified by destRect.
(Overrides SurfacePaint(IntPtr, Int32, AweRect, AweRect).)
Protected methodRaisePropertyChanged
Helper method to raise the PropertyChanged event.
(Inherited from ViewModel.)
Public methodSaveToJPEG(String)
Save this bitmap to a JPEG image on disk.
Public methodSaveToJPEG(String, Int32)
Save this bitmap to a JPEG image on disk.
Public methodSaveToPNG(String)
Save this bitmap to a PNG image on disk.
Public methodSaveToPNG(String, Boolean)
Save this bitmap to a PNG image on disk.
Protected methodScroll
This method is called whenever the IWebView instance this surface is assigned to, wants to 'scroll' an existing section of the Surface by a certain offset. It your responsibility to translate the pixels within the specified clipping rectangle (clipRect) by the specified offset.
(Overrides SurfaceScroll(Int32, Int32, AweRect).)
Top
Properties

  NameDescription
Public propertyBuffer
A pointer to the raw pixel buffer (32-bit BGRA format, 4 bpp).
Public propertyHeight
Gets the current height if the surface.
(Overrides SurfaceHeight.)
Public propertyIsDirty
Gets or sets if the bitmap has changed.
Public propertyIsDisposed
Gets if this instance is already disposed and eligible for garbage collection.
(Inherited from NativeViewModel.)
Public propertyRowSpan
The number of bytes per row (this is usually Width * 4).
Public propertyView
Gets the IWebView instance this surface is currently assigned to.
(Inherited from Surface.)
Public propertyWidth
Gets the current width of the surface.
(Overrides SurfaceWidth.)
Top
Events

  NameDescription
Public eventDisposed
Occurs when an instance of this class has been disposed.
(Inherited from NativeViewModel.)
Public eventInitialized
Occurs when this surface is being initialized for use with a IWebView.
(Inherited from Surface.)
Public eventPropertyChanged
Occurs when the value of a property of this class, has changed.
(Inherited from ViewModel.)
Public eventResized
Occurs when the surface has completed resizing and has updated its buffer.
(Inherited from Surface.)
Public eventUpdated
Occurs when the surface has been updated, which is after a Paint(IntPtr, Int32, AweRect, AweRect) or Scroll(Int32, Int32, AweRect) operation has completed.
(Inherited from Surface.)
Top
Remarks

This surface wraps the BitmapSurface available through the native Awesomium library.
Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
See Also

Reference