CAD designated area to draw a jpg file

The main use of Function:


_DMxDrawX::DrawToJpg


The contents of the specified area to draw a jpg file. Details are as follows:


parameter Explanation

BSTR sJpgFilePath

Jpg file name

DOUBLE dLbx

The output range of the lower left corner coordinates X, the document coordinate system

DOUBLE dLby

Output range lower left corner coordinate Y, coordinate system of the document

DOUBLE dRtx

The output range of the upper right corner coordinates X, the document coordinate system

DOUBLE dRty

Output range upper-right corner coordinate Y, coordinate system of the document

iWidth

Pixel bitmap in the width direction, and -1 iHeight not -1, the height and width of the document calculates high, otherwise, it is the system default: 1000

iHeight

Pixel bitmap in the height direction is not -1 -1 iWidth and by calculating the height and width of the document high, otherwise, it is the system default: 1000

pBkColor

Back color bitmap, if NULL, take a black background color


js implemented Definitions:


UserSaveJpg function () { 
    var getPt = mxOcx.NewComObject ( "IMxDrawUiPrPoint"); 

    getPt.message = "point to take a first point range"; 

    IF (! getPt.go () =. 1) { 
        return; 
    } 
    var frstPt = getPt. value (); 
    IF (frstPt == null) 
        return; 
    // create new objects IMxDrawUtility 
    var mxOcx.NewUtility UTL = (); 
    // interact with a user to obtain a rectangular frame parameter a rectangle a diagonal point; two parameters command line prompt 
    var secondPt = utl.GetCorner (frstPt, "point to take a second point range"); 
    IF (secondPt == null) 
        return; 
    mxOcx.DrawToJpg ( "C: \\ mxcad.jpg", frstPt.x, frstPt .y, secondPt.x, secondPt.y, 200, 200, 0); 
    Alert ( "pictures have been saved"); 
}

Guess you like

Origin www.cnblogs.com/yzy0224/p/10955477.html