IEMFFileInfo object interface is used to read width, height and resolution of EMF metafile

Methods:

  • LoadFile - loads EMF file and reads information about it (see properties)

Properties (read-only):

  • Width returns Width of the EMF file previously loaded using LoadFile
  • Height returns Height of the EMF file previously loaded using LoadFile
  • Resolution returns Resolution (DPI) of the EMF file previously loaded using LoadFile

Example

  W = 640
  H = 480
  Set Movie = CreateObject("SWFScout.FlashMovie")
  Movie.InitLibrary "demo", "demo"


' Movie creating and setting parameters

  Movie.BeginMovie 0,0,W,H,1,12,6
  Movie.Compressed = true
  Movie.SetBackgroundColor 255,255,255


  ' read information about EMF file
  Set EMFFileInfo = CreateObject("SWFScout.EMFFileInfo")
  EMFFileInfo.LoadFile "PrintedHTML.emf"
  EMF_Width = EMFFileInfo.Width
  EMF_Height = EMFFileInfo.Height
  Set EMFFileInfo = nothing

  Movie.PlayMetaFileToHDC "PrintedHTML.emf", 0,0,W / EMF_Width , H / EMF_Height
  Movie.PlaceFromHDC 1

Movie.ShowFrame 1

Movie.EndMovie

Movie.SaveToFile "Metafile.swf"