Problems with BricsCAD and VBA to manage raster images

Can you explain me the difference between the VBA and BricsCAD to manage raster images ?First I write some code in VBA to open an raster image (BMP 6000x6000 pixels, 8 bits coded, size of pixel=0.50 meter) and I use the method AddImage (I have discover after a long time that I must give for the scalefactor and rotation variables respectively the values 1 and 0 (see VB code) to load the image and manage after that the scale and rotation values). ScaleFactor = 1# Angle = 0# Set RasterObj = myWrk.ModelSpace.AddImage(imageName, Pt1, ScaleFactor, Angle) RasterObj.Layer = NomLayer Call RasterObj.Rotate(Pt1, RotationAngle) Call RasterObj.ScaleEntity(Pt1, LongImag) RasterObj.UpdateThe image in the BricsCAD window is not what I expected ! The variable LongImag in the VB code was equal to 3000 (6000 pixels * 0.50 = 3000 meters) and the width and the height of the image were equal to 3333.333 meters !!! In the property window of the image the image scale is equal to 3333.333.Why the scale value is not equal to 3000 ?In this property window if I try to give a scale equal to 3000 then the image is higher than wider (height=5966 and width=3000) !!!If I give to the RasterObj.ImageHeight and RasterObj.ImageWidth respectively the value 3000 then the image as a width equal to 3333.333 (false) and a height equal to 3000 (right). What's wrong ?Second if I load the same image with the BricsCAD menu (_ieimage) and I give scale X=3000, scale Y=3000, rotation=0 the image is OK (width=3000 and height=3000). The scale value in the property window is equal to 0.2500 !!!Why the scale value with VBA code is 3000 and with ieimage command the scale value is 0.2500 ?What is the significant of the 'non othogonal' check box in the property window ?Otherwise is there a possibility to access to the '_DrawOrder' property to bring the image in the background of the drawing ?Thank you for your helpLaurent MATHIAS - CORALIS

Comments

  • Laurent,thanks for pointing out this problem: we could indeed reproduce it. We are investigating it and will keep you update on our plans for improvement.Best regards,Hans De Backer

This discussion has been closed.