![]() |
【转帖】question of creating raster image
question of creating raster image
question of creating raster image hi there, i am converting my program from using odt to dd on creating raster image. i use the oddbrasterimage::setorientation() to set the image size. it shows right size in drawing. however when i do "image manager/details" in autocad, i see the default size showing something else. is there a way to set the default size? in odt, i use adaddimageentitytolist() and give pixelsize as one of the inputs, which is used to get the default size and resolution. also how do i set the image transparency and clipping? i want to set them to on, the default values are off. i tried oddbrasterimage::setclipped() for clipping, but it seems not working. thanks! al quote: i use the oddbrasterimage::setorientation() to set the image size. it shows right size in drawing. however when i do "image manager/details" in autocad, i see the default size showing something else. probably autocad updates image resolution having loaded the raster file. for bitonal images transparent background can be set using oddbrasterimage::setdisplayopt() to set image clipped you need to use setclipboundary() and setclipped(). sergey slezkin sergey, thank you for the answer. the setdisplayopt() works. question about the image resulotion? how do i set the image resolution using dd? i attached an image using autocad and dd. they show different resolutions when i do "detail" on the image. alan they show different resolution and default size for rasterimagedef. 1. like in odwriteex sample you can use code: pimagedef->setimage(odgirasterimagedesc::createobject(1024, 384, // pix size odgirasterimage::kinch, // units odgevector2d(x,y) // default resolution )); but these parameters are updated by autocad when it loads the image file. so their values saved to dwg are not important. sergey slezkin it works perfectly. thank you for the help, sergey. quote: originally posted by sergey slezkin they show different resolution and default size for rasterimagedef. 1. like in odwriteex sample you can use code: pimagedef->setimage(odgirasterimagedesc::createobject(1024, 384, // pix size odgirasterimage::kinch, // units odgevector2d(x,y) // default resolution )); but these parameters are updated by autocad when it loads the image file. so their values saved to dwg are not important. hi sergej, for me it´s very important to have the correct value for size. the dwg files are used for data exchange betwen two non acad applications. wrong values for size results in wrong displaying of the bitmap. do you mean that you pass correct values to code: pimagedef->setimage(odgirasterimagedesc::createobject(1024, 384, // pix size odgirasterimage::kinch, // units odgevector2d(x,y) // default resolution and get wrong results? be sure to call setimagedefid() before setorientation(). sergey slezkin |
所有的时间均为北京时间。 现在的时间是 06:09 PM. |