class Image |
Parent: Drawingelement |
|
Methods:explode, height, height=, normal, origin, origin=, path, pixelheight, pixelwidth, size=, transform!, width, width=, zrotation |
|
Sample Code:imagetests.rb |
|
Instance Methods |
explode |
The explode method is used to explode an image into a face with a texture. |
Syntax: |
entitiesarray = image.explode |
Arguments: |
|
Return Value: |
entitiesarray - an Array object of entities if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
height |
The height method is used to retrieve the height of the image. |
Syntax: |
height = image.height |
Arguments: |
|
Return Value: |
height - the height of the model if successful |
Comments: |
The height is given in inches. |
Example: |
model = Sketchup.active_model |
height= |
The height= method is used to set the height of the image. |
Syntax: |
height = image.height = height |
Arguments: |
height - the height, in inches. to set the image |
Return Value: |
height - the new height if successful |
Comments: |
The height is given in inches. |
Example: |
model = Sketchup.active_model |
normal |
The normal method is used to retrieve the 3d vector that is perpendicular to the plane of the image. |
Syntax: |
vector = image.normal |
Arguments: |
|
Return Value: |
vector - a Vector3d object if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
origin |
The origin method is used to retrieve the 3d point that defines the origin of the image. |
Syntax: |
point = image.origin |
Arguments: |
|
Return Value: |
point - a Point3d object containing the origin location if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
origin= |
The origin= method is used to set the 3d point as the origin of the image. |
Syntax: |
point = image.origin = point |
Arguments: |
point - a Point3d object with the new origin |
Return Value: |
point - the Point3d object representing the newly established origin if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
path |
The path method is used to retrieve the path of the file defining the image. |
Syntax: |
path = image.path |
Arguments: |
|
Return Value: |
path - the path for the image file if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
pixelheight |
The pixelheight method is used to retrieve the height of the image file in pixels. |
Syntax: |
height = image.pixelheight |
Arguments: |
|
Return Value: |
height - the height of the image in pixels if successful |
Comments: |
|
Example: |
model
= Sketchup.active_model |
pixelwidth |
The pixelwidth method is used to retrieve the width of the image file in pixels. |
Syntax: |
width = image.pixelwidth |
Arguments: |
|
Return Value: |
width - the width of the image in pixels if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
size= |
The size= method is used to set the width and height of the image. |
Syntax: |
size = image.size = width, height |
Arguments: |
width - the width of the image height - the height of the image |
Return Value: |
size - the new width and height of the image if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
transform! |
The transform! method is used to apply a transformation to the image. |
Syntax: |
image = image.transform! transformation |
Arguments: |
transformation - a Transformation object |
Return Value: |
image - the transformed Image object if successful |
Comments: |
|
Example: |
model = Sketchup.active_model |
width |
The width method is used to retrieve the width of the image. |
Syntax: |
width = image.width |
Arguments: |
|
Return Value: |
width - the width of the image if successful |
Comments: |
The width is given in inches. |
Example: |
model = Sketchup.active_model |
width= |
The width= method is used to set the width of the image. |
Syntax: |
width = image.width = width |
Arguments: |
width - the width, in inches. to set the image |
Return Value: |
width - the new width if successful |
Comments: |
The width is given in inches. |
Example: |
model = Sketchup.active_model |
zrotation |
The zrotation method is used to retrieve the angle that the image is rotated about the normal 3d vector from an arbitrary X axis. |
Syntax: |
rotation = image.zrotation |
Arguments: |
|
Return Value: |
rotation - the angle that the image is rotated about he normal 3d vector (if successful) |
Comments: |
|
Example: |
model = Sketchup.active_model |