Объект IInImage


Растровый рисунок.

Свойства

СвойствоОписание
DataДанные в бинарном формате.
HeightВысота (в пикселях).
ResolutionXРазрешение растра в точках на дюйм по оси X.
ResolutionYРазрешение растра в точках на дюйм по оси Y.
SurfaceПоверхность рисования.
TransparentЗарезервировано.
TransparentColorОпределяет какой из цветов изображения не будет выводится при выводе изображения.
WidthШирина (в пикселях).

Методы

МетодОписание
LoadFromFileЗагрузить изображение из файла.
SaveToFileСохранить изображение в файл.

Пример

sub Rectangle(theSurface, x1, y1, x2, y2) 
  Dim theContour, theContourPart 
  Dim theParam

  theSurface.Pen.Color = 1
  Set theContour = Application.CreateObject(0, theParam)
  Set theContourPart = theContour.Insert(0)
  theContourPart.InsertVertex 0, x1, y1, 0
  theContourPart.InsertVertex -1, x1, y2, 0
  theContourPart.InsertVertex -1, x2, y2, 0
  theContourPart.InsertVertex -1, x2, y1, 0
  theContourPart.InsertVertex -1, x1, y1, 0

  theSurface.PaintContour theContour, true
end sub

' Вызывается при отпускании клавиши мыши над окном карты
sub MapEditors_MouseUp(aButton, aShift, aX, aY)
  Dim theImage, theParam
  Dim theContour, theContourPart

  Set theImage = Application.CreateObject(2, theParam)
  theImage.Width = 800
  theImage.Height = 600
  theImage.ResolutionX = 400
  theImage.ResolutionY = 400
  Dim x1, y1, x2, y2 
theImage.Surface.sPointDeviceToWorld 100, 100, x1, y1 theImage.Surface.sPointDeviceToWorld 200, 200, x2, y2 Rectangle theImage.Surface, x1, y1, x2, y2 theImage.SaveToFile "c:\tmp\image1.jpg" end sub

См.также

IIngeoApplication, CreateObject