User Tools

Site Tools


thinkgeo.mapsuite.portablecore.gdiplusrastersource

ThinkGeo.MapSuite.Core.GdiPlusRasterSource

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

This class allows you to view standard .NET GDI+ image types such as BMP, TIF, JPG, and PNG.

Inheritance Hierarchy

  • System.Object
    • ThinkGeo.MapSuite.Core.RasterSource
      • ThinkGeo.MapSuite.Core.GdiPlusRasterSource

Members Summary

Public Constructors

GdiPlusRasterSource()

  • This is the constructor the for the class.
Remarks
  • None
Parameters

GdiPlusRasterSource(String)

  • This is the constructor the for the class.
Remarks
  • You can specify a path and filename that does not actually exist if you use the StreamLoading event. This event only uses the PathFileName parameter as a unique string that will be passed to you in the event, so that you can determine what stream you want to pass back.
Parameters
  • imagePathFilename
    • Type:String
    • Description:This parameter represents the image you want to load.

GdiPlusRasterSource(String,String)

  • This is the constructor the for the class.
Remarks
  • You can specify a path and filename that does not actually exist if you use the StreamLoading event. This event only uses the PathFileName parameter as a unique string that will be passed to you in the event, so that you can determine what stream you want to pass back.
Parameters
  • imagePathFilename
    • Type:String
    • Description:This parameter represents the image you want to load.
  • worldfilePathFilename
    • Type:String
    • Description:This parameter represents the world file path and filename you want to load.

GdiPlusRasterSource(String,RectangleShape)

  • This is the constructor the for the class.
Remarks
  • You can specify a path and filename that does not actually exist if you use the StreamLoading event. This event only uses the PathFileName parameter as a unique string that will be passed to you in the event, so that you can determine what stream you want to pass back.
Parameters
  • imagePathFilename
    • Type:String
    • Description:This parameter represents the image you want to load.
  • imageExtent
    • Description:This parameter represents the extnet of the image you want to load.

Protected Constructors

Public Methods

CloneDeep()

  • N/A
Remarks
  • N/A
Return Value
Parameters

GetWorldFileText()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

GetImageWidth()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetImageHeight()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetHorizontalResolution()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters

GetVerticalResolution()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single
  • Description:N/A
Parameters

GetBoundingBox()

  • N/A
Remarks
  • N/A
Return Value
Parameters

GetProjectionText()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Open()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

Close()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

GetImage(RectangleShape,Int32,Int32)

  • N/A
Remarks
  • N/A
Return Value
Parameters
  • canvasWidth
    • Type:Int32
    • Description:N/A
  • canvasHeight
    • Type:Int32
    • Description:N/A

ToString()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetType()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Type
  • Description:N/A
Parameters

Protected Methods

OnStreamLoading(StreamLoadingEventArgs)

  • This method allows you to raise the StreamLoading event.
Remarks
  • This method allows you to raise the StreamLoading event. Normally events are not accessible to derived classes, so we exposed a way to raise the event as necessary through this protected method.
Return Value
  • Type:Void
  • Description:None
Parameters
  • e
    • Description:This parameter represents the event arguments you want to raise the StreamLoading event with.

GetImageWidthCore()

  • This method returns the width of the image in screen coordinates.
Remarks
  • This method returns the width of the image in screen coordinates.
Return Value
  • Type:Int32
  • Description:This method returns the width of the image in screen coordinates.
Parameters

GetImageHeightCore()

  • This method returns the height of the image in screen coordinates.
Remarks
  • This method returns the height of the image in screen coordinates.
Return Value
  • Type:Int32
  • Description:This method returns the height of the image in screen coordinates.
Parameters

OpenCore()

  • This method opens the ImageSource so that it is initialized and ready to use.
Remarks
  • This protected virtual method is called from the concrete public method Open. The Open method plays an important role, as it is responsible for initializing the ImageSource. Most methods on the ImageSource will throw an exception if the state of the ImageSource is not opened. When the map draws each layer, it will open the ImageSource as one of its first steps; then, after it is finished drawing with that layer, it will close it. In this way, we are sure to release all resources used by the ImageSource. When implementing this abstract method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the ImageSource.
Return Value
  • Type:Void
  • Description:None
Parameters

CloseCore()

  • This method opens the ImageSource so that it is initialized and ready to use.
Remarks
  • This protected virtual method is called from the concrete public method Close. The Close method plays an important role in the life cycle of the ImageSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override this method, it is recommended that that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed FeatureSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.
Return Value
  • Type:Void
  • Description:None
Parameters

GetImageCore(RectangleShape,Int32,Int32)

  • This method returns an image based on the worldExtent, image width and image height.
Remarks
  • This method is responsible for returning the image based on the parameters passed in.
Return Value
  • Type:GeoImage
  • Description:This method returns an image based on the worldExtent, image width and image height.
Parameters
  • worldExtent
    • Description:This parameter represents the worldExtent you want to draw.
  • canvasWidth
    • Type:Int32
    • Description:This parameter represents the width of the image you want to draw.
  • canvasHeight
    • Type:Int32
    • Description:This parameter represents the height of the image you want to draw.

GetBoundingBoxCore()

  • This method returns the bounding box of the RasterSource.
Remarks
  • This method returns the bounding box of the RasterSource.
Return Value
  • Description:This method returns the bounding box of the RasterSource.
Parameters

OnOpeningRasterSource(OpeningRasterSourceEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnOpenedRasterSource(OpenedRasterSourceEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnClosingRasterSource(ClosingRasterSourceEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnClosedRasterSource(ClosedRasterSourceEventArgs)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

CloneDeepCore()

  • N/A
Remarks
  • N/A
Return Value
Parameters

GetProjectionTextCore()

  • N/A
Remarks
  • N/A
Return Value
  • Type:String
  • Description:N/A
Parameters

Finalize()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters

MemberwiseClone()

  • N/A
Remarks
  • N/A
Return Value
  • Type:Object
  • Description:N/A
Parameters

Public Properties

IsNegative

  • This property gets and sets whether the image shows as negative (inverted colors).
Remarks
  • You can set this property to show the negative of the image.
Return Value
  • Type:Boolean

IsGrayscale

  • This property gets and sets whether the image shows in grayscale.
Remarks
  • This property allows you to show the image in grayscale.
Return Value
  • Type:Boolean

FileName

  • This property returns the filename part of the PathFileName.
Remarks
  • None
Return Value
  • Type:String

FilePath

  • This property returns the path part of the PathFileName.
Remarks
  • None
Return Value
  • Type:String

PathFilename

  • This property returns the path and filename of the image you want to represent.
Remarks
  • When you specify the path and filename, it should be in the correct format as such; however, the file does not need to actually exist on the file system. This is to allow us to accept streams supplied by the developer at runtime. If you choose to provide a file that exists, we will attempt to use it. If we cannot find it, then we will raise the SteamLoading event and allow you to supply the stream. For example, you can pass in “C:\NotARealPath\File1.jpg” which does not exist on the file system. When we raise the event for you to supply a stream, we will pass to you the path and filename so you can differentiate the files.
Return Value
  • Type:String

Projection

  • N/A
Remarks
  • N/A
Return Value

Transparency

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

BlueTranslation

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

RedTranslation

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

GreenTranslation

  • N/A
Remarks
  • N/A
Return Value
  • Type:Single

IsOpen

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

HasProjectionText

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

Protected Properties

HasProjectionTextCore

  • N/A
Remarks
  • N/A
Return Value
  • Type:Boolean

Public Events

GettingSourceImage

  • N/A
Remarks
  • N/A

Event Arguments:GettingSourceImageEventArgs

GottenSourceImage

  • N/A
Remarks
  • N/A

Event Arguments:GottenSourceImageEventArgs

StreamLoading

  • This event allows you to pass in your own stream to represent the image.
Remarks
  • If you wish, you can pass in your own stream to represent the image. The stream can come from a variety of places, including isolated storage, a compressed file, or an encrypted stream. When the image is finished with the stream it will dispose of it, so be sure to keep this in mind when passing the stream in. If you do not pass in an alternate stream, the class will attempt to load the file from the file system using the PathFileName property.

Event Arguments:StreamLoadingEventArgs

OpeningRasterSource

  • N/A
Remarks
  • N/A

Event Arguments:OpeningRasterSourceEventArgs

OpenedRasterSource

  • N/A
Remarks
  • N/A

Event Arguments:OpenedRasterSourceEventArgs

ClosingRasterSource

  • N/A
Remarks
  • N/A

Event Arguments:ClosingRasterSourceEventArgs

ClosedRasterSource

  • N/A
Remarks
  • N/A

Event Arguments:ClosedRasterSourceEventArgs

thinkgeo.mapsuite.portablecore.gdiplusrastersource.txt · Last modified: 2017/03/16 21:59 (external edit)