CreateImageBackground Method (IViewManager)

CreateImageBackground Method (IViewManager) | Send Feedback
See Also Example

ImageBackground[out]
  Image background

FileName
  Path and file name of image

Position
  Position of image as defined in dsImageBackgroundPosition_e

OffsetX
  x offset of the image

OffsetY
  y offset of the image

ScaleX
  x scale of the image

ScaleY
  y scale of the image

Creates an image background using the specified image.

# Syntax

Visual Basic |
--- | ---
    Function CreateImageBackground( _
       ByVal FileName As System.String, _
       ByVal Position As dsImageBackgroundPosition_e, _
       ByVal OffsetX As System.Double, _
       ByVal OffsetY As System.Double, _
       ByVal ScaleX As System.Double, _
       ByVal ScaleY As System.Double _
    ) As ImageBackground

C# |
--- | ---
    ImageBackground CreateImageBackground(
       System.string FileName,
       dsImageBackgroundPosition_e Position,
       System.double OffsetX,
       System.double OffsetY,
       System.double ScaleX,
       System.double ScaleY
    )

JavaScript |
--- | ---
    CreateImageBackground(
       FileName : String,
       Position : String,
       OffsetX : Number,
       OffsetY : Number,
       ScaleX : Number,
       ScaleY : Number
    ) : dsImageBackground

COM native C++ |
--- | ---
    HRESULT CreateImageBackground(
       BSTR FileName,
       dsImageBackgroundPosition_e Position,
       DOUBLE OffsetX,
       DOUBLE OffsetY,
       DOUBLE ScaleX,
       DOUBLE ScaleY,
       IImageBackground** ImageBackground
    )

C++ |
--- | ---
    DSRESULT CreateImageBackground(
       const dsString& FileName,
       dsImageBackgroundPosition_e Position,
       double OffsetX,
       double OffsetY,
       double ScaleX,
       double ScaleY,
       dsImageBackground** ImageBackground
    )

#### Parameters

FileName
  Path and file name of image
Position
  Position of image as defined in dsImageBackgroundPosition_e
OffsetX
  x offset of the image
OffsetY
  y offset of the image
ScaleX
  x scale of the image
ScaleY
  y scale of the image
ImageBackground[out] or Return Value
  Image background

# Example

Create Model and Sheet Views (C#)
Create Model and Sheet Views (VB.NET)
Create Model and Sheet Views (VBA)

# Remarks

If Position is set to dsImageBackgroundPosition_e.dsImageBackgroundPosition_Stretch, then the values specified for the OffsetX, OffsetY, ScaleX, and ScaleY parameters are ignored.

# See Also

####

IViewManager Interface
IViewManager Members
IModelNamedView::GetImageBackground Method ()
IModelNamedView::SetImageBackground Method ()

# Availability

DraftSight V1R5.0