Kadmos.com

  Home | Products | Download | Purchase | Support | Language

Google
Search site:

Products
DXFReader ActiveX Control
 • DXF Files Overview
 • Distribution
 • Installation
 • Quick Start
 • Control Summary
 • Download
 • Buy now!
 • DXFReader Reference
  • Properties
   • ACADVersion
   • AppID
   • AppIDs
   • AutoRedraw
   • AxesColor
   • BackColor
   • BaseX
   • BaseY
   • Block
   • BlockRecord
   • BlockRecords
   • Blocks
   • BorderStyle
   • Class
   • Classes
   • CurrentColor
   • CurrentEleva...
   • CurrentLayer
   • CurrentLineType
   • CurrentTextS...
   • CurrentThick...
   • DateCreated
   • DateLastEdited
   • DIMSTYLEc
   • DimStyles
   • DisplayAspec...
   • DrawingComment
   • DrawMode
   • Enabled
   • Entities
   • Entity
   • FileName
   • FileStatus
   • Font
   • ForeColor
   • GridColor
   • hDC
   • Layer
   • Layers
   • LineType
   • LineTypes
   • MaxX
   • MaxY
   • MinX
   • MinY
   • MouseIcon
   • MousePointer
   • Obj
   • Objects
   • PaletteButto...
   • PaletteCance...
   • PaletteCaption
   • PaletteOkBut...
   • PaletteWindo...
   • PaletteWindo...
   • PaletteWindo...
   • Picture
   • PictureBaseX
   • PictureBaseY
   • PictureHeight
   • PictureScale...
   • PictureScaleX
   • PictureScaleY
   • PictureWidth
   • PlotAspectRatio
   • PlotDocument...
   • PlotMarginBo...
   • PlotMarginLeft
   • PlotMarginRight
   • PlotMarginTop
   • PlotMode
   • PlotOriginX
   • PlotOriginY
   • PlotPenWidth
   • PlotRendering
   • PlotRotation
   • PlotScale
   • RotationAngle
   • ScaleX
   • ScaleY
   • ScrollBars
   • ShowAxes
   • ShowBasePoint
   • ShowGrid
   • ShowLimits
   • ShowPlotMargins
   • Style
   • Styles
   • ToolTipText
   • TotalEditTime
   • TotalEditTim...
   • TranslationX
   • TranslationY
   • UCS
   • UCSs
   • UserTimer
   • UserTimerDays
   • Version
   • View
   • ViewPort
   • ViewPortMaxX
   • ViewPortMaxY
   • ViewPortMinX
   • ViewPortMinY
   • ViewPorts
   • Views
   • ZoomInOutPer...
Hidden Properties
  • Methods
  • Events

 • DXFPlot Reference

IXF ActiveX Control

Postel ActiveX Control

Tech Support
OnLine Support
Phone Support
Sample Code
Registered Users
FAQ
References
Kadmos
Contact Kadmos
Environment
Customer List
Newsletter
Download
ActiveX Controls
Updates
Purchase
Price List
International Resellers
Our Guarantee
Shipment Options
Payment Options
Shopping Cart
    DXFReader Control - PictureScaleMode Property

Kadmos DXFReader ActiveX Control      Previous Next
DXFReader Control
PictureScaleMode Property

Description Returns/sets a value indicating the unit of measurement for coordinates of a picture.
Syntax
Visual Basic
[form.]DXFReader.PictureScaleMode[ = PictureScaleModeEnum]
Visual C++ long DXFReader.GetPictureScaleMode();
void DXFReader.SetPictureScaleMode(long nNewValue);
Delphi property PictureScaleMode: TOleEnum (PictureScaleModeEnum);
C#
Remarks Valid settings for the PictureScaleMode property are:

ValueConstantDescription

0UserUser defined
1Twip1 picture inch = 1440 drawing units (1440 twips per logical inch; 567 twips per logical centimeter)
2Point1 picture inch = 72 drawing units (72 points per logical inch)
3Pixel1 picture pixel = 1 drawing unit
4Character1 horizontal picture inch = 12 drawing units, 1 vertical picture inch = 6 drawing units (horizontal = 120 twips per unit; vertical = 240 twips per unit)
5Inch1 picture inch = 1 drawing unit
6Millimeter1 picture millimeter = 1 drawing unit
7Centimeter1 picture centimeter = 1 drawing unit


The PictureScaleMode property is used to scale the background picture loaded in the control.
To understand how this property works let's examine the following picture:



This picture is a bitmap image 200 x 200 Pixels size. It has 37.87 pixels per centimeter so its size in different units are:

5.28 x 5.28centimeters
52.8 x 52.8millimeters
2.08 x 2.08inchs
2995.20 x 2995.20twips
149.76 x 149.76points
24.96 x 12.48characters

The figure below shows a DXFReader control displaying a simple drawing containing a square with 200 x 200 units size and its lower-left corner with coodinates (0,0), and a circle with center in (100,100) and radius of 100.



Setting PictureScaleMode = Pixel every single pixel of the picture will be one drawing unit long so the code below will show the following picture:

With DXFReader1

    .PictureScaleMode = Pixel
    .Picture = LoadPicture("Picture.bmp")
    .ReadDXF "Drawing.dxf"

End With




The particular below shows the previous picture zoomed near the axes origin and with the ShowAxes property setted to true.



You can see that every pixel is one drawing units long.
The following figures show the differences of the scaling modes.


PictureScaleMode = Millimeter



PictureScaleMode = Centimeter



PictureScaleMode = Inch



PictureScaleMode = Twip



PictureScaleMode = Point



PictureScaleMode = Character


Setting PictureScaleMode = User the picture is scaled according the PictureScaleX, PictureScaleY, PictureHeight and PictureWidth properties.
The code below will show the following picture:

With DXFReader1

    .PictureScaleMode = User
    .Picture = LoadPicture("Picture.bmp")
    .ReadDXF "Drawing.dxf"
    .PictureScaleX = 1
    .PictureScaleY = 1
    .PictureHeight = 100
    .PictureWidth = 100

End With


Data Type PictureScaleModeEnum (Enumeration)
Default Value Pixel (3)

Copyright © 2008 Kadmos.com - All rights reserved. Privacy Policy