home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- cybergraphics.library/AllocModeList
- cybergraphics.library/BestCModeIDTagList
- cybergraphics.library/CModeRequestTagList
- cybergraphics.library/DoCDrawMethodTagList
- cybergraphics.library/FillPixelArray
- cybergraphics.library/FreeModeList
- cybergraphics.library/GetCyberMapAttr
- cybergraphics.library/GetCyberIDAttr
- cybergraphics.library/IsCyberModeID
- cybergraphics.library/MovePixelArray
- cybergraphics.library/ReadPixelArray
- cybergraphics.library/ReadRGBPixel
- cybergraphics.library/SwapPixelArray
- cybergraphics.library/WritePixelArray
- cybergraphics.library/WriteRGBPixel
- cybergraphics.library/BestCyberModeID cybergraphics.library/BestCyberModeID
-
-
- NAME
- BestCModeIDTagList -- calculate the best ModeID with given parameters
-
- SYNOPSIS
- ID = BestCModeIDTagList(TagItems)
- d0 a0
-
- ID = BestCModeIDTagList(Tag1, ...)
-
- FUNCTION
- To determine the best cybergraphics ModeID to fit the parameters set
- in the TagList.
-
- INPUTS
- TagItems - A pointer to an array of TagItems.
-
- TAGS
-
- CYBRBIDTG_Depth (ULONG) - depth the returned ModeID must support
- Default is 8
-
- CYBRBIDTG_NominalWidth (UWORD),
- CYBRBIDTAG_NominalHeight (UWORD) - desired width and height the ModeID
- should have
-
- CYBRBIDTG_MonitorID (ULONG) - if multiple graphics boards are
- installed in the system, you can choose
- the desired one with this tag
-
- RESULT
- ID - ID of the best mode to use, or INVALID_ID if a match could
- not be found.
-
- cybergraphics.lib/CModeRequestTagList cybergraphics.lib/CModeRequestTagList
-
-
- NAME
- CModeRequestTagList -- get screenmode from user using a requester.
-
- SYNOPSIS
- result = CModeRequestTagList(requester,tags);
- D0 A0 A1
-
- LONG CModeRequestTagList(APTR,struct TagItem *);
-
- FUNCTION
- Prompts the user for input by showing all available cybergraphics
- screenmodes in a requester.
- If the user cancels or the system aborts the request, FALSE is returned,
- otherwise the displaymode id of the selected screenmode.
-
- INPUTS
- requester - not used currently. you have to set it to 0 !
- tags - pointer to an optional tag list which may be used to
- control features of the requester.
-
- TAGS
-
- Tags used for the screen mode requester
-
- CYBRMREQ_Screen (struct Screen *) - Screen on which to open the requester.
- default locale will be used.
-
- CYBRMREQ_WinTitle (STRPTR) - Title to use for the requesting window.
-
- CYBRMREQ_OKText (STRPTR) - Label of the positive gadget in the
- requester. English default is "OK".
-
- CYBRMREQ_CancelText (STRPTR) - Label of the negative gadget in the
- requester. English default is "Cancel".
-
- CYBRMREQ_MinWidth (ULONG) - The minimum display width to let the user
- choose. Default is 320.
-
- CYBRMREQ_MaxWidth (ULONG) - The maximum display width to let the user
- choose. Default is 1600.
-
- CYBRMREQ_MinHeight (ULONG) - The minimum display height to let the user
- choose. Default is 240.
-
- CYBRMREQ_MaxHeight (ULONG) - The maximum display height to let the user
- choose. Default is 1200.
-
- CYBRMREQ_MinDepth (UWORD) - The minimum display depth to let the user
- choose. Default is 8.
-
- CYBRMREQ_MaxDepth (UWORD) - The maximum display depth to let the user
- choose. Default is 32.
-
- CYBRMREQ_CModelArray (UWORD *) - Array of color models which should be
- available for screenmode selection. Currently supported
- colormodels are:
-
- PIXFMT_LUT8
- PIXFMT_RGB15
- PIXFMT_BGR15
- PIXFMT_RGB15PC
- PIXFMT_BGR15PC
- PIXFMT_RGB16
- PIXFMT_BGR16
- PIXFMT_RGB16PC
- PIXFMT_BGR16PC
- PIXFMT_RGB24
- PIXFMT_BGR24
- PIXFMT_ARGB32
- PIXFMT_BGRA32
-
- default is all colormodels available, nothing filtered
-
- RESULT
- result - 0 if the user cancelled the requester or if something
- prevented the requester from opening. If != 0 the displaymode
- id of the selected screenmode is returned.
-
- BUGS
- The requester structure is not supported in (v40)
- cybergraphics.lib/DoCDrawMethodTagList cybergraphics.lib/DoCDrawMethodTagList
-
-
- NAME
- DoCDrawMethodTagList - Do the given hook for the supplied rastport
-
- SYNOPSIS
- DoCDrawMethodTagList(hook,rport,taglist)
- a0 a1 a2
-
- void DoCDrawMethodTagList(struct Hook *,struct RastPort *,
- struct TagItem *)
-
- FUNCTION
- This function will call the given hook for the given rastport. Is is
- mainly used to do direct bitmap modifications in a locked graphics
- environment. You have to support ALL known color models, so only use
- this call if you really need it !!
-
-
- INPUTS
-
- hook - pointer to callback hook which will be called
- with object == (struct RastPort *)
- and message == [ (APTR) memptr,
- (ULONG) offsetx, (ULONG) offsety,
- (ULONG) xsize, (ULONG) ysize,
- (ULONG) bytesperrow, (UWORD) bytesperpix,
- (UWORD) colormodel]
-
- Where colormodel is one of the following:
-
- PIXFMT_LUT8
- PIXFMT_RGB15
- PIXFMT_BGR15
- PIXFMT_RGB15PC
- PIXFMT_BGR15PC
- PIXFMT_RGB16
- PIXFMT_BGR16
- PIXFMT_RGB16PC
- PIXFMT_BGR16PC
- PIXFMT_RGB24
- PIXFMT_BGR24
- PIXFMT_ARGB32
- PIXFMT_BGRA32
-
- rport- A pointer to a cybergraphics RastPort
-
- tags - optional taglist, currently not used. Set it to NULL
-
- NOTES
- Use this call only if you want high speed. Remember that you have to
- handle all color models ! Do not use ANY os functions in your hook.
- They would cause unpredictable results.
-
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of this limitation clipping is not supported.
- cybergraphics.library/GetCyberMapAttr cybergraphics.library/GetCyberMapAttr
-
-
- NAME
- GetCyberMapAttr -- Returns information about a cybergraphics bitmap
-
- SYNOPSIS
- value=GetCyberMapAttr(bitmap,attribute_number);
- d0 a0 d1
-
- ULONG GetCyberMapAttr(struct BitMap *,ULONG);
-
- FUNCTION
- Determines information about a extended cybergraphics bitmap.
- This function should be used instead of making any assumptions about
- fields in the bitmap. This will provide future compatibility.
-
- INPUTS
- bitmap - pointer to a cybergraphics bitmap structure
-
- attribute_number - A number telling cybergraphics which attribute
- of the bitmap should be returned:
-
- CYBRMATTR_XMOD returns BytesPerRow of the supplied bitmap
-
- CYBRMATTR_BPPIX returns number of bytes per pixel
-
- CYBRMATTR_PIXFMT return the pixel format of the bitmap
-
- CYBRMATTR_WIDTH return width of the bitmap in pixels
-
- CYBRMATTR_HEIGHT return the height in lines
-
- CYBRMATTR_DEPTH returns bits per pixel
-
- BUGS
-
- NOTES
-
- Unknown attributes are reserved for future use, and return (-1L).
-
- You should know what you are doing if you call this function !
- Don't apply it on a non cybergraphics bitmap !
-
- cybergraphics.library/GetCyberIDAttr cybergraphics.library/GetCyberIDAttr
-
-
- NAME
- GetCyberIDAttr -- Returns information about a cybergraphics id
-
- SYNOPSIS
- value=GetCyberIDAttr(CyberIDAttr,CyberDisplayModeID);
- d0 d0 d1
-
- ULONG GetCyberIDAttr(ULONG,ULONG);
-
- FUNCTION
- Determines information about a specified displaymode id.
-
- INPUTS
- CyberDisplayModeID - cybergraphics mode id
-
- attribute_number - A number telling cybergraphics which attribute
- of the displaymode id should be returned:
-
- CYBRIDATTR_PIXFMT return the pixel format of the supplied
- screenmode id
-
- CYBRIDATTR_WIDTH returns visible width in pixels
- CYBRIDATTR_HEIGHT returns visible height in lines
- CYBRIDATTR_DEPTH returns bits per pixel
- CYBRIDATTR_BPPIX should return BytesPerPixel
-
- BUGS
-
- NOTES
-
- Unknown attributes are reserved for future use, and return (-1L).
-
- You should know what you are doing if you call this function !
- Don't apply it on a non cybergraphics displaymode !
-
-
- cybergraphics.library/IsCyberModeID cybergraphics.library/IsCyberModeID
-
-
- NAME
- IsCyberModeID -- returns whether supplied ModeID is a cybergraphics id
-
- SYNOPSIS
- result = IsCyberModeID(modeID)
- D0 D0
-
- BOOL IsCyberModeID(ULONG)
-
- FUNCTION
- Returns whether the supplied ModeID is a cybergraphics.library mode
- identifier.
-
- INPUTS
- modeID -- a 32 bit display identifier.
-
- RESULT
- result - Flag to indicate if modeID is a cybergraphics ID
-
- cybergraphics.library/FillPixelArray cybergraphics.library/FillPixelArray
-
-
- NAME
- FillPixelArray -- fill a rectangular area with the supplied ARGB value
- starting at a specified x,y location and continuing through to another
- x,y location within a certain RastPort
-
- SYNOPSIS
- count = FillPixelArray(RastPort,DestX, DestY,SizeX,SizeY,ARGB)
- D0 A1 D0:16 D1:16 D2:16 D3:16 D4:32
-
-
- LONG FillPixelArray(struct RastPort *,UWORD,UWORD,UWORD,UWORD,ULONG)
-
- FUNCTION
- For each pixel in a rectangular region, write the supplied color value
- into the bitmap used to describe a particular rastport.
-
- INPUTS
- RastPort - pointer to a RastPort structure
- (DestX,DestY) - starting point in the RastPort
- (SizeX,SizeY) - size of the rectangle that should be transfered
- ARGB - the desired color in AARRGGBB format. Every component
- allocates 8 bits of the returned longword. The coding is as
- follows:
-
- AA - 8-bit alpha channel component
- (set it to 00 if you do not use it !)
- RR - 8-bit red component of the pixel
- GG - 8-bit green component
- BB - 8-bit blue component
-
- RESULT
- count will be set to the number of pixels plotted
-
- NOTES
- This function should only be used on screens depths > 8 bits.
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of this limitation clipping is not supported.
-
-
- cybergraphics.library/InvertPixelArray cybergraphics.library/InvertPixelArray
-
-
- NAME
- InvertPixelArray -- invert a rectangular area tarting at a specified x,y
- location and continuing through to another x,y location within a certain
- RastPort
-
- SYNOPSIS
- count = InvertPixelArray(RastPort,DestX, DestY,SizeX,SizeY)
- D0 A1 D0:16 D1:16 D2:16 D3:16
-
-
- LONG InvertPixelArray(struct RastPort *,UWORD,UWORD,UWORD,UWORD)
-
- FUNCTION
- Invert each pixel in a rectangular region.
-
- INPUTS
- RastPort - pointer to a RastPort structure
- (DestX,DestY) - starting point in the RastPort
- (SizeX,SizeY) - size of the rectangle that should be transfered
-
- RESULT
- count will be set to the number of pixels plotted
-
- NOTES
- This function should only be used on screens depths > 8 bits.
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of this limitation clipping is not supported.
-
-
- cybergraphics.library/MovePixelArray cybergraphics.library/MovePixelArray
-
-
- NAME
- MovePixelArray -- move the color values of a rectangular area of
- pixels starting at a specified x,y location and continuing through
- to another x,y location within a certain RastPort
-
- SYNOPSIS
- count = MovePixelArray(SrcX, SrcY, RastPort,SrcX , SrcY ,SizeX, SizeY)
- D0 D0:16 D1:16 A1 D2:16 D3:16 D4:16 D5:16
-
- LONG MovePixelArray(UWORD,UWORD,struct RastPort *,UWORD,UWORD,UWORD,
- UWORD)
-
- FUNCTION
- For each pixel in a rectangular region, move the pixel value from a
- specified source to a specified destination
-
- INPUTS
- (SrcX,SrcY) - starting point in the destination rectangle
- RastPort - pointer to a RastPort structure
- (DestX,DestY) - starting point in the destination rectangle
- (SizeX,SizeY) - size of the rectangle that should be transfered
-
- RESULT
- count will be set to the number of pixels moved
-
- NOTES
- This function should only be used on screens depths > 8 bits.
- The blitter can be used to move the data if the bitmap is in display
- memory. This is way you should use this call.
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
- cybergraphics.library/ReadPixelArray cybergraphics.library/ReadPixelArray
-
-
- NAME
- ReadPixelArray -- Read the color values of a rectangular array of
- pixels starting at a specified x,y location and continuing through
- to another x,y location within a certain RastPort
-
- SYNOPSIS
- count = ReadPixelArray(destRect,DestX,DestY,DestMod,RastPort,SrcX ,
- D0 A0 D0:16 D1:16 D2:16 A1 D3:16
- SrcY ,SizeX,SizeY,DestFormat)
- D4:16 D5:16 D6:16 D7
-
- LONG ReadPixelArray(APTR *,UWORD,UWORD,UWORD,struct RastPort *,UWORD,
- UWORD,UWORD,UWORD,UBYTE)
-
- FUNCTION
- For each pixel in a rectangular region, write the color value to a
- linear array of color values from the bitmap used to describe a
- particular rastport.
-
- INPUTS
- destRect - pointer to an array of pixels where to write the pixel
- data to. The pixel format is specified in DestFormat
- (DestX,DestY) - starting point in the destination rectangle
- DestMod - The number of bytes per row in the destination rectangle.
- RastPort - pointer to a RastPort structure
- (SrcX,SrcY) - starting point in the RastPort
- (SizeX,SizeY) - size of the rectangle that should be transfered
- DestFormat - pixel format in the destination rectangle
- Currently supported formats are:
-
- RECTFMT_RGB 3 bytes per pixel, one byte red, one blue
- and one byte green component
-
- RECTFMT_RGBA 4 bytes per pixel, one byte red, one blue,
- one byte green component and the last
- byte is alpha channel information which
- is 0 if the board does not support alpha
- channel
-
- RECTFMT_ARGB 4 bytes per pixel, one byte red, one blue,
- one byte green component and the first
- byte is alpha channel information. If the
- board does not support alpha channel a
- 0 is returned for alpha channel information
-
- RESULT
- count will be set to the number of pixels read
-
- NOTES
- This function should only be used on screens depths > 8 bits.
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
- cybergraphics.library/SwapPixelArray cybergraphics.library/SwapPixelArray
-
-
- NAME
- ReadPixelArray -- Swap the color values of a rectangular array of
- pixels starting at a specified x,y location and continuing through
- to another x,y location within a certain RastPort
-
- SYNOPSIS
- count = SwapPixelArray(MemRect,MemX ,MemY,MemMod,RastPort, RastX ,
- D0 A0 D0:16 D1:16 D2:16 A1 D3:16
- RastY ,SizeX,SizeY,MemFormat)
- D4:16 D5:16 D6:16 D7
-
- LONG ReadPixelArray(APTR *,UWORD,UWORD,UWORD,struct RastPort *,UWORD,
- UWORD,UWORD,UWORD,UBYTE)
-
- FUNCTION
- For each pixel in a rectangular region, swap the color values of a
- linear array of color values and a bitmap used to describe a
- particular rastport.
-
- INPUTS
- MemRect - pointer to an array of pixels where to write the pixel
- data of the bitmapto. The pixel format is specified in
- MemFormat
- (MemX,MemY) - starting point in the memory rectangle
- MemMod - The number of bytes per row in the memory rectangle.
- RastPort - pointer to a RastPort structure
- (RastX,RastY) - starting point in the RastPort rectangle
- (SizeX,SizeY) - size of the rectangle that should be transfered
- MemFormat - pixel format in the memory rectangle
- Currently supported formats are:
-
- RECTFMT_RGB 3 bytes per pixel, one byte red, one blue
- and one byte green component
-
- RECTFMT_RGBA 4 bytes per pixel, one byte red, one blue,
- one byte green component and the last
- byte is alpha channel information which
- is 0 if the board does not support alpha
- channel
-
- RECTFMT_ARGB 4 bytes per pixel, one byte red, one blue,
- one byte green component and the first
- byte is alpha channel information. If the
- board does not support alpha channel a
- 0 is returned for alpha channel information
-
- RESULT
- count will be set to the number of pixels swapped
-
- NOTES
- This function should only be used on screens depths > 8 bits.
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
- cybergraphics.library/ReadRGBPixel cybergraphics.library/ReadRGBPixel
-
-
- NAME
- ReadRGBPixel -- Reads a pixel from a specified location
-
- SYNOPSIS
- color = ReadRGBPixel(RastPort,x ,y )
- D0 A0 D0 D1
-
- ULONG ReadRGBPixel(struct RastPort *,UWORD,UWORD);
-
- FUNCTION
- Read the Alpha,Red,Green & Blue 8-bit color value of the pixel at a
- specified x,y location within a certain RastPort
-
- INPUTS
- rp - pointer to a RastPort structure
- x,y - the coordinates of the pixel
-
- RESULT
- color - the desired color in AARRGGBB format. Every component
- allocates 8 bits of the returned longword. The coding is as
- follows:
-
- AA - 8-bit alpha channel component
- (boards which do not have an alpha channel return 00)
- RR - 8-bit red component of the pixel
- GG - 8-bit green component
- BB - 8-bit blue component
-
- NOTES
- This function should only be used on screens depths > 8 bits. Use
- ReadPixel() on 8 bit screens !
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
- cybergraphics.library/WritePixelArray cybergraphics.library/WritePixelArray
-
-
- NAME
- WritePixelArray -- write the color value of a rectangular array of
- pixels starting at a specified x,y location and continuing through
- to another x,y location within a certain RastPort
-
- SYNOPSIS
- count = WritePixelArray(srcRect,SrcX ,SrcY ,SrcMod,RastPort,DestX,
- D0 A0 D0:16 D1:16 D2:16 A1 D3:16
- DestY,SizeX,SizeY,SrcFormat)
- D4:16 D5:16 D6:16 D7
-
- LONG WritePixelArray(APTR *,UWORD,UWORD,UWORD,struct RastPort *,UWORD,
- UWORD,UWORD,UWORD,UBYTE)
-
- FUNCTION
- For each pixel in a rectangular region, write the color value from a
- linear array of color values into the bitmap used to describe a
- particular rastport.
-
- INPUTS
- srcRect - pointer to an array of pixels from which to fetch the
- pixel data. The pixel format is specified in SrcFormat
- (SrcX,SrcY) - starting point in the source rectangle
- SrcMod - The number of bytes per row in the source rectangle.
- RastPort - pointer to a RastPort structure
- (DestX,DestY) - starting point in the RastPort
- (SizeX,SizeY) - size of the rectangle that should be transfered
- SrcFormat - pixel format in the source rectangle
- Currently supported formats are:
-
- RECTFMT_RGB 3 bytes per pixel, one byte red, one blue
- and one byte green component
-
- RECTFMT_RGBA 4 bytes per pixel, one byte red, one blue,
- one byte green component and the last
- byte is alpha channel information. If you
- do not use alpha channel set this byte to
- 0 !!!
-
- RECTFMT_ARGB 4 bytes per pixel, one byte red, one blue,
- one byte green component and the first
- byte is alpha channel information. If you
- do not use alpha channel set this byte to
- 0 !!!
-
- RESULT
- count will be set to the number of pixels plotted
-
- NOTES
- This function should only be used on screens depths > 8 bits. Use
- WritePixelArray8() on 8 bit screens !
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
-
- cybergraphics.library/WriteRGBPixel cybergraphics.library/WriteRGBPixel
-
-
- NAME
- WriteRGBPixel -- Writes a pixel to a specified location
-
- SYNOPSIS
- error = WriteRGBPixel(RastPort,x ,y ,color)
- D0 A0 D0 D1 d2
-
- ULONG WriteRGBPixel(struct RastPort *,UWORD,UWORD,ULONG);
-
- FUNCTION
- Write the Alpha,Red,Green & Blue 8-bit color value of the given color
- to a specified x,y location within a certain RastPort
-
- INPUTS
- rp - pointer to a RastPort structure
- x,y - the coordinates of the pixel
- color - the desired color in AARRGGBB format. Every component
- allocates 8 bits of the returned longword. The coding is as
- follows:
-
- AA - 8-bit alpha channel component
- (set it to 00 if you dont want to use it !)
- RR - 8-bit red component of the pixel
- GG - 8-bit green component
- BB - 8-bit blue component
-
- RESULT
- error = 0 if pixel succesfully changed
- = -1 if (x,y) is outside the rastport
-
- NOTES
- This function should only be used on screens depths > 8 bits. Use
- WritePixel() on 8 bit screens !
-
- BUGS
- In the current release this function only works on screen rastports.
- Because of that limitation clipping is not supported.
-
-