HyperCard XCMD "PgColorX" can draw color pictures. It can use for Action Game, Shooting Game and Color Animation on HyperCard. PgColorX is free software and freely distoributable.
---parameter---------
Buffer number<buffer>
Buffer: 0 - 127.
<color>
select RGB color.
red = "65535,0,0"
green = "0,65535,0"
blue = "0,0,65535"
white = "65535,65535,65535"
black = "0,0,0"
gray = "32767,32767,32767"
Transfer Mode<mode>
"copy"
"notCopy"
"or"
"notOr"
"bic"
"notBic"
"xor"
"notXor"
"addOver"
"addPin"
"subOver"
"subPin"
"adMax"
"adMin"
"blend"
"transparent"
Option Color<opColor>
"blend"Blending Level etc.
---Alert---------
Error report is catched by [the result]
PgColorX "New",0,"64,64"
if the result is not empty then answer the result
---Draw to Window with no Buffers Commands---------
Draw a PICT resource(DrawPicture)
PgColorX "DrawPict",<PICT
Name/ID>,<*topleft/rect>
Draw a cicn resource(DrawCIcon)
PgColorX "DrawCicn",<cicn
Name/ID>,<*topleft/rect>
Paint a rectangler(FillRect)
PgColorX
"DrawPaint",<color>,<rect>,<*mode>
Draw string(DrawString)
PgColorX
"DrawString",<string>,<color>,<topleft>,<*mode>
Flash Color Image(InvalRect)
PgColorX "Flash",<*rect>
---Make and Dispose Buffer Commands---------
Make a new buffer(NewGWorld)
PgColorX
"New",buffer,<size/rect>,<*depth=1,4,8,16,32>
Dispose all buffers(DisposeGWorld)
PgColorX "Kill"
Dispose a buffer(DisposeGWorld)
PgColorX "Kill",buffer
---Draw to Buffer Commands---------
Draw a PICT resource to a buffer
PgColorX "LoadPict",buffer,<PICT
Name/ID>,<*topleft/rect>
Draw a cicn resource to a buffer
PgColorX "LoadCicn",buffer,<PICT
Name/ID>,<*topleft/rect>
Paint a rectangler
PgColorX
"Paint",buffer,<color>,<rect>,<*mode>,<*opColor>
Draw string to a buffer
PgColorX
"String",buffer,<string>,<color>,<topleft>,<*mode>,<*opColor>
---Draw Shapes to Buffer---------
Pixel
PgColorX
"SetPixel",buffer,<color>,<loc>,<*mode>,<*opColor>
Line
PgColorX
"Line",buffer,<color>,width,<startLoc>,<endLoc>,<*mode>,<*opColor>
Rectangle
PgColorX
"Rect",buffer,<frameColor>,<fillColor>,width,<rect>,<*mode>,<*opColor>
Round Rectangle
PgColorX
"RoundRect",buffer,<frameColor>,<fillColor>,width,<rect>,<*mode>,<*opColor>
Circle(Oval)
PgColorX
"Oval",buffer,<frameColor>,<fillColor>,width,<rect>,<*mode>,<*opColor>
Arc
PgColorX
"Arc",buffer,<frameColor>,<fillColor>,<startAngle,endAngle>,width,<rect>,<*mode>,<*opColor>
Polyangle
PgColorX
"PolyAngle",buffer,polySides,<frameColor>,<fillColor>,startAngle,width,<rect>,<*mode>,<*opColor>
---Transfer Buffer---------
Draw a buffer image to card window(CopyBits)
PgColorX "OnDraw",srcBuffer,<*srcRect>,<*dstTopleft/rect>,<*mode>
Transfer a buffer to a buffer(CopyBits)
PgColorX "BufToBuf",srcBuffer,dstBuffer,<*srcRect>,<*dstTopleft/rect>,<*mode>,<*opColor>
Transfer a buffer to a buffer with Flipping Horizontal
PgColorX "FlipH",srcBuffer,dstBuffer,<*srcRect>,<*dstRect>,<*mode>,<*opColor>
Transfer buffer to buffer with Flipping Vertical
PgColorX "FlipV",srcBuffer,dstBuffer,<*srcRect>,<*dstRect>,<*mode>,<*opColor>
Transfer like Tile
PgColorX "Tiling",srcBuffer,dstBuffer,<*srcRect>,<*dstRect>,<*mode>,<*opColor>
Draw Picture as Font
PgColorX "PicFont",srcBuffer,dstBuffer,<string>,<*dstTopLeft>,<*mode>,<*opColor>
Transfer with rotation
PgColorX "Rotate",srcBuffer,dstBuffer,<*srcRect>,<*srcPin(使用不可)>,<*dstPin>,<*clipRect>,Angle,*h_size,*v_size<*mode>,<*opColor>
h_size,v_size: 256=100% size. 512=200% size. 128= 50% size.
---Set WindowPICT---------
Set a WindowPICT(SetWindowPic)
PgColorX "SetWinPic",buffer,<*srcRect>,<*dstTopleft/rect>
Unset a WindowPICT
PgColorX "KillWinPic"
---GWorldPtr---------
Get a GWorldPtr
PgColorX "GetGWorld",buffer
GWorldPtr returns to [the result]
Set a GWorldPtr
PgColorX "SetGWorld",buffer,GWorldPtr
---Get Pixel Color RGB---------
Get a pixel's color(GetPixel)
PgColorX "GetPixel",buffer,<loc>
RGB color returns to [the result]
---Save as PICT Resource---------
Save a buffer as PICT resource(OpenCPicture,AddResource)
PgColorX "SavePICT",buffer,<*rect>,*resourceID,*resourceName
---ClipBoard---------
Copy buffer to clipboard(OpenCPicture,PutScrap)
PgColorX "CopyPict",buffer,<*rect>
Paste clipboard image to buffer(GetScrap,DrawPicture)
PgColorX "PastePict",buffer
Go HyperCard Stacks Page(Japanese)
(c)PugoStation 2001-2005 mailto: waffle@tg7.so-net.ne.jp