MapWinGIS:Image Clear

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

Clear

Clears the image using the specified canvas color as the new color for every pixel in the image.


VB.NET Usage

Function Clear(CanvasColor As System.UInt32, Optional cBack As MapWinGIS.ICallback) As Boolean

            Parameters

CanvasColor

The color to be used to as the new color of every pixel in the image. This is a UInt32 representation of an RGB value.
cBack Optional. The ICallback object that will receive the progress and error events while the image is cleared.
ReturnValue A boolean value representing the success or failure of clearing the image.

Sample Code

    Private Sub ClearImage()
        Dim image As New MapWinGIS.Image
        Dim col As System.UInt32
        Dim success As Boolean
        'Set the color to use
        col = System.Convert.ToUInt32(RGB(255, 0, 0))
        'Clear the image using red as the canvas color
        success = image.Clear(col, Me)
        'Display failure message if the image was not successfully cleared
        If Not success Then
            MsgBox("The image was not successfully cleared.")
        End If
    End Sub
  

VB 6 Usage
Function Clear(CanvasColor As OLE_COLOR, Optional cBack As ICallback) As Boolean
            Parameters

CanvasColor

The color to be used to as the new color of every pixel in the image.
cBack Optional. The ICallback object that will receive the progress and error events while the image is cleared.
ReturnValue A boolean value representing the success or failure of clearing the image.

Sample Code

    Private Sub ClearImage()
        Dim image As New MapWinGIS.image
        Dim col As OLE_COLOR
        Dim success As Boolean
        'Set the color to use
        col = RGB(255, 0, 0)
        'Clear the image using red as the canvas color
        success = image.Clear(col, Me)
        'Display failure message if the image was not successfully cleared
        If Not success Then
            MsgBox ("The image was not successfully cleared.")
        End If
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:Image_Clear"

This page has been accessed 1,344 times. This page was last modified on 9 November 2005, at 16:46.