home *** CD-ROM | disk | FTP | other *** search
- /*
-
- funky.cwx
-
- Object with text region must be selected. Makes text look funky.
- Objects may need to be rearranged
-
- Copyright 1997 by TrueSpectra Inc.
-
- This code is provided purely for demonstration purposes and is not
- supported or under warranty. Feel free to modify and examine this
- example script for your own purposes.
-
- */
-
- handle = CwGetSelectedObject()
-
- /* no object selected */
- if \CwIsHandleValid(handle) then do
- call CwMsg "No object selected."
- exit
- end
-
- /* object must be block text or headline text */
- temp = CwGetProperty(handle, "Region type")
- if temp \= "Headline Text" & temp \= "Block Text" then do
- call CwMsg "Selected object must be text, not" temp
- exit
- end
-
- Ycenter = CwGetProperty(handle, "Position:Y Center")
- Xcenter = CwGetProperty(handle, "Position:X Center")
- width = CwGetProperty(handle, "Position:Width")
- height = CwGetProperty(handle, "Position:Height")
-
- /* cut the text */
- call CwCopy handle
-
- /* make the text tool type a Color fade */
- call CwSetRegion handle, "Custom Region"
- call CwSetTool handle, "Color Fade"
- areg = CwGetRegion(handle)
- view = CwGetView(areg)
-
- /* make the text upside down */
- call CwSelectView(view)
- call CwPaste
-
-
- /* text */
- handle2 = CwFindFirstObject(CwGetCurrentView())
-
- /* make the object the proper size */
- call CwSetPosition handle2, Xcenter, Ycenter, width * 0.9, height * 0.9, 0, 0
-
- /* Using the lens tool This is KEWL */
- handle3 = CwDuplicateObject(handle2)
- call CwSetProperty handle2, "Position:Angle", 180
-
- call CwSetTool handle3, "Lens"
- call CwSetRegion handle3, "Rectangle"
-
- /* make the lens bigger */
- width = CwGetProperty(handle3, "Position:Width")
- height = CwGetProperty(handle3, "Position:Height")
-
-
- height = height *1.1
- width = width *1.1
-
-
- call CwSetProperty handle3, "Position:Width", width
- call CwSetProperty handle3, "Position:Height", height
-
- /* change the factor */
- factor = CwGetTool(handle3)
- call CwSetProperty factor, "Factor", 1.5
-
-
-