When CAD design drawing, need to insert an external image, the image scaling can be provided, the rotation angle, the display image properties such as the file name.
The main use of Function:
_DMxDrawX::DrawImageMark
A marker object image drawing system. Details are as follows:
parameter | Explanation |
---|---|
DOUBLE dPosX |
Drawing position, is the center point of the picture X |
DOUBLE dPosY |
Drawing position, y is the center point of the picture |
DOUBLE dScale |
Scaling, if a negative input, indicates with the viewport image size scaling, a negative decision value indicates the height of the image, the image width automatic calculation |
DOUBLE dAng |
Picture rotation angle |
BSTR pszFileName |
Picture file name |
BSTR pszTwinkeImageFiles |
ImageFile used when flashing. After setting the file, call MxDraw :: TwinkeEnt will flash alternately displayed. Files may be provided a plurality of scintillators simultaneously, separated by commas file, such as: 1.jgp, 2.jpg, 3.jpg |
VARIANT_BOOL isSaveData |
Picture data, whether stored with the map |
js implemented Definitions:
InsertImage 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 = () + "mxca.jpg \\"; Alert (sImageFile); // manufactured by drawing a marker object image // parameter is a drawing position is the center point of X-picture; two parameters as the drawing position is the center point of the Y image; three for scaling parameter; four for a rotation angle parameter; // five parameters for the picture file name; parameter file is set to blink six; seven for the parameter data with the view of whether the picture stored mxOcx.DrawImageMark (frstPt.x, frstPt.y, -100.0 , 0.0, sImageFile, "", to false); }