The picture as a background image is visible but not editing.
The main use of Function:
_DMxDrawX::DrawImageToBackground
Background to draw raster. Details are as follows:
parameter | Explanation |
---|---|
BSTR sFileName |
Raster file file path .DWGBMPJPG |
LONG lLeftUpX |
Upper left corner of the window coordinates X, the viewport displayed in the viewing zone control gate shown in FIG. |
LONG lLeftUpY |
FIG upper left position of the gate in the control displayed on the display viewing zone Y, the viewport window coordinates |
js implemented Definitions:
BackgroundImage function () { // Create a COM component object var getPt = mxOcx.NewComObject ( "IMxDrawUiPrPoint"); getPt.message = "midpoint insertion point to take a picture"; IF (! getPt.go () =. 1) { return; } var frstPt getPt.value = (); IF (frstPt == null) { return; } // control program in the disk file path var sImageFile mxOcx.GetOcxAppPath = () + "\\ mxcad.jpg"; Alert (sImageFile); // manufactured by drawing a marker object image // parameter is a raster image file .DWGBMPJPG file path; two for the upper left position parameter X displayed on the display of the gate in FIG control viewport, the viewport window coordinates ; // three parameters for the Y position of the upper left corner of the grid shown in FIG display control viewport, the viewport window coordinates; mxOcx.DrawImageToBackground (sImageFile, frstPt.x, frstPt.y); }