| |
 |  |  |
 | Command |  | Argument |  | Datatype |  | Default |
 | Min |
 | Max |  |  |
 | Format: |
 | MakeImageObj |
| Name = Object name, |  | STRING |  |
- |  | - |  | - |  |  | |  |
| | Image selection, |  | SELECTION |  |
- |  | - |  | - |  |  | |  |
| | Width = Board width in Å, |
 | FLOAT |  | - |  | - |
 | - |
 |  | |  |
| | Height = Board height in Å |  | FLOAT |  | - |  | - |  | - |
 |  |  | Python: |  | result = MakeImageObj(name,selection1,width,height) |  |
 |  | Menu: |  | View > Image > Make object |  |  |
 | Related: |
 | LoadBMP
, LoadPNG, MoveMesh
, MakeTextObj, ShowImage
, AutoMoveImage, AnimateImage
, SwapImage, HideImage
, DelImage |  |  |  | Required: |
 |  |
 |  |
The MakeImageObj
command creates a rectangular polygon of the specified width and height, and attaches the selected image to it. The image must have been loaded before using
LoadBMP or LoadPNG
.
The created images rotates around the origin of its local coordinate system
, which is at the center of the image. Use the MoveMesh
command to shift the origin.
Example 1:
MakeImageObj Title,2,80,40
Create an object named Title, 80x40 Angstroms large and attach image
2 to it.
Example 2:
obj = MakeImageObj Wall,3,width=50,height=50
Create an object named Wall, 50x50 Angstroms large, attach image
3 to it and assign the object number to variable 'obj'.
Example macro:
# EXAMPLE MakeImageObj
# Requires YASARA Model
Clear
LoadBMP ysrbkgr1
for i=1 to 8
MakeImageObj bg(i),ysrbkgr1,(20+i*2),(20+i*2)
RotateObj (i),Z=(i*10)
RotateObj (i),X=(i*10)
AutoRotateObj (i),Y=(0.25*i)
 | | Figure: Result of the example macro above. |
|