home *** CD-ROM | disk | FTP | other *** search
- card_3057.xml
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
- <card>
- <id>3057</id>
- <filler1>0</filler1>
- <cantDelete> <false /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <owner>2747</owner>
- <link rel="stylesheet" type="text/css" href="stylesheet_3118.css" />
- <part>
- <id>1</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>18</left>
- <top>14</top>
- <right>212</right>
- <bottom>47</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Paste Foreground Picture</name>
- <script>On MouseUp
- Set hilite of the target to true
- DoPastePicture "ForegroundPicture"
- Set hilite of the target to false
- End MouseUp</script>
- </part>
- <part>
- <id>2</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>18</left>
- <top>64</top>
- <right>212</right>
- <bottom>97</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Paste Background Picture</name>
- <script>On MouseUp
- Set hilite of the target to true
- DoPastePicture "BackgroundPicture"
- Set hilite of the target to false
- End MouseUp</script>
- </part>
- <part>
- <id>3</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>18</left>
- <top>114</top>
- <right>212</right>
- <bottom>146</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Paste Mask Picture</name>
- <script>On MouseUp
- Set hilite of the target to true
- DoPastePicture "MaskPicture"
- Set hilite of the target to false
- End MouseUp</script>
- </part>
- <part>
- <id>4</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>236</left>
- <top>52</top>
- <right>359</right>
- <bottom>109</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Generate Result</name>
- <script>On DoMaskImage
- Global ForegroundPicture, BackgroundPicture, MaskPicture
- If ForegroundPicture is empty then
- Answer "You need to specify a foreground picture."
- Exit DoMaskImage
- End If
- If BackgroundPicture is empty then
- Answer "You need to specify a background picture."
- Exit DoMaskImage
- End If
- If MaskPicture is empty then
- Answer "You need to specify a mask picture."
- Exit DoMaskImage
- End If
- Get MaskImage(ForegroundPicture, BackgroundPicture, MaskPicture)
- If it < 0 then
- Answer "Error" && it && "generating result."
- Exit DoMaskImage
- End If
- PictureToScrap it
- KillPicture it
- End DoMaskImage
-
- On MouseUp
- Set hilite of the target to true
- DoMaskImage
- Set hilite of the target to false
- End MouseUp
- </script>
- </part>
- <name></name>
- <script>On DoPastePicture PictureVarName
- Do "Global" && PictureVarName
- Get PictureFromScrap()
- If it < 0 then
- If it = -102 then
- Answer "There is no picture on the Clipboard."
- Else If it = -108 then
- Answer "Not enough memory to paste the picture."
- Else
- Answer "Error" && it && "getting picture from Clipboard."
- End If
- Exit DoPastePicture
- End If
- Put it into NewPicture
- If the value of PictureVarName is not empty then
- Answer "There is already a" && PictureVarName & "." & return & ¬
- "Get rid of it?" with "Cancel" or "OK"
- If it is "Cancel" then
- Exit DoPastePicture
- End If
- KillPicture the value of PictureVarName
- Do "Put empty into" && PictureVarName
- End If
- Do "Put" && NewPicture && "into" && PictureVarName
- End DoPastePicture
-
- On GenerateRamp
- Ask "From color?" with "0,0,0"
- Put it into FromColor
- Ask "To color?" with "65535,65535,65535"
- Put it into ToColor
- Ask "Bounds?" with "0,0,256,256"
- Put it into RampBounds
- Answer "Ramp direction?" with "Horizontal" or "Vertical"
- Put it is "Horizontal" into HorizRamp
- Get Ramp(FromColor, ToColor, RampBounds, HorizRamp)
- If it < 0 then
- Answer "Error" && it && "generating ramp"
- Exit GenerateRamp
- End If
- PictureToScrap it
- KillPicture it
- End GenerateRamp
-
- On OpenCard
- Global ForegroundPicture, BackgroundPicture, MaskPicture
- Put empty into ForegroundPicture
- Put empty into BackgroundPicture
- Put empty into MaskPicture
- End OpenCard
-
- On CloseCard
- Global ForegroundPicture, BackgroundPicture, MaskPicture
- If ForegroundPicture is not empty then
- KillPicture ForegroundPicture
- Put empty into ForegroundPicture
- End If
- If BackgroundPicture is not empty then
- KillPicture BackgroundPicture
- Put empty into BackgroundPicture
- End If
- If MaskPicture is not empty then
- KillPicture MaskPicture
- Put empty into MaskPicture
- End If
- End CloseCard
- </script>
- </card>
-
-
-