forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrop.lcdoc
More file actions
69 lines (45 loc) · 1.69 KB
/
crop.lcdoc
File metadata and controls
69 lines (45 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Name: crop
Type: command
Syntax: crop <image> to <left>, <top>, <right>, <bottom>
Summary:
Trims an <image>.
Introduced: 2.0
OS: mac, windows, linux
Platforms: desktop, server, mobile
Example:
crop image 1 to 100,100,200,200
Example:
crop image "photo" to the rect of graphic "Overlay"
Parameters:
image:
Any image reference.
left:
The left, top, right, and bottom describe the new rectangle of the
image.
top:
right:
bottom:
Description:
Use the <crop> <command> to remove parts of an image, or to extend the
image's edges.
The <crop> <command> changes the <image(object)|image's> <rectangle>
<property> to the new rectangle. Unlike changing the <rectangle>
directly, the <crop> <command> removes image data outside the new
<rectangle>, instead of scaling the <image(keyword)> to fit.
If the <crop> rectangle is smaller than the <image(object)|image's>
original <rectangle>, the parts of the <image(keyword)> outside the
<crop> rectangle are removed. This is a permanent operation; the cropped
portions do not reappear if you use the <crop> <command> to change the
<image(object)|image's> <rectangle> back to the original size.
If the <crop> rectangle is larger than the <image(object)|image's>
original <rectangle>, blank <pixels> are added to one or more edges of
the <image(keyword)>.
>*Important:* The <crop> <command> cannot be used on a
> <referenced control|referenced image>. Doing so will cause an
> <execution error>.
References: flip (command), rotate (command), property (glossary),
referenced control (glossary), command (glossary),
execution error (glossary), image (keyword), rectangle (keyword),
image (object), pixels (property), imageData (property),
rectangle (property)
Tags: ui