a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 graphics.library
  AddAnimOb
  AddBob
  AddFont
  AddVSprite
  AllocBitMap
  AllocDBufInfo
  AllocRaster
  AllocSpriteDataA
  AndRectRegion
  AndRegionRegion
  Animate
  AreaCircle
  AreaDraw
  AreaEllipse
  AreaEnd
  AreaMove
  AskFont
  AskSoftStyle
  AttachPalExtra
  AttemptLockLayerRom
  BestModeIDA
  BitMapScale
  BltBitMap
  BltBitMapRastPort
  BltClear
  BltMaskBitMapRastPort
  BltPattern
  BltTemplate
  CBump
  CEND
  CINIT
  CMOVE
  CWAIT
  CalcIVG
  ChangeExtSpriteA
  ChangeSprite
  ChangeVPBitMap
  ClearEOL
  ClearRectRegion
  ClearRegion
  ClearScreen
  ClipBlit
  CloseFont
  CloseMonitor
  CoerceMode
  CopySBitMap
  DisownBlitter
  DisposeRegion
  DoCollision
  Draw
  DrawEllipse
  DrawGList
  EraseRect
  ExtendFont
  FindColor
  FindDisplayInfo
  Flood
  FontExtent
  FreeBitMap
  FreeColorMap
  FreeCopList
  FreeCprList
  FreeDBufInfo
  FreeGBuffers
  FreeRaster
  FreeSprite
  FreeSpriteData
  FreeVPortCopLists
  GetAPen
  GetBPen
  GetBitMapAttr
  GetColorMap
  GetDisplayInfoData
  GetDrMd
  GetExtSpriteA
  GetGBuffers
  GetOPen
  GetRGB32
  GetRGB4
  GetRPAttrA
  GetSprite
  GetVPModeID
  GfxAssociate
  GfxFree
  GfxLookUp
  GfxNew
  InitArea
  InitBitMap
  InitGMasks
  InitGels
  InitMasks
  InitRastPort
  InitTmpRas
  InitVPort
  InitView
  LoadRGB32
  LoadRGB4
  LoadView
  LockLayerRom
  MakeVPort
  ModeNotAvailable
  Move
  MoveSprite
  MrgCop
  NewRegion
  NextDisplayInfo
  ObtainBestPenA
  ObtainPen
  OpenFont
  OpenMonitor
  OrRectRegion
  OrRegionRegion
  OwnBlitter
  PolyDraw
  QBSBlit
  QBlit
  ReadPixel
  ReadPixelArray8
  ReadPixelLine8
  RectFill
  ReleasePen
  RemBob
  RemFont
  RemIBob
  RemVSprite
  ScalerDiv
  ScrollRaster
  ScrollRasterBF
  ScrollVPort
  SetABPenDrMd
  SetAPen
  SetBPen
  SetChipRev
  SetCollision
  SetDrMd
  SetFont
  SetMaxPen
  SetOPen
  SetOutlinePen
  SetRGB32
  SetRGB32CM
  SetRGB4
  SetRGB4CM
  SetRPAttrA
  SetRast
  SetSoftStyle
  SetWriteMask
  SortGList
  StripFont
  SyncSBitMap
  Text
  TextExtent
  TextFit
  TextLength
  UnlockLayerRom
  VBeamPos
  VideoControl
  WaitBOVP
  WaitBlit
  WaitTOF
  WriteChunkyPixels
  WritePixel
  WritePixelArray8
  WritePixelLine8
  XorRectRegion
  XorRegionRegion
Include
GuruMeditation
Docs » Autodocs » graphics.library » WriteChunkyPixels

NAME

	WriteChunkyPixels -- write the pen number 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. (V40)

SYNOPSIS

	WriteChunkyPixels(rp,xstart,ystart,xstop,ystop,array,bytesperrow)
A0 D0 D1 D2 D3 A2 D4
VOID WriteChunkyPixels(struct RastPort *, LONG, LONG,
LONG, LONG, UBYTE *, LONG);

FUNCTION

	For each pixel in a rectangular region, decode the pen number selector
from a linear array of pen numbers into the bit-planes used to describe
a particular rastport.

INPUTS

	rp     -  pointer to a RastPort structure
(xstart,ystart) - starting point in the RastPort
(xstop,ystop) - stopping point in the RastPort
array - pointer to an array of UBYTEs from which to fetch the
pixel data.
bytesperrow - The number of bytes per row in the source array.
This should be at least as large as the number of pixels
being written per line.

RESULT

NOTES

	xstop must be >= xstart
ystop must be >= ystart
The source array can be in fast RAM.
===chunky-to-planar conversion HW:
GfxBase->ChunkyToPlanarPtr is either NULL, or a pointer to a HW
register used to aid in the process of converting 8-bit chunky
pixel data into the bit-plane format used by the Amiga custom
display chips. If NULL, then such hardware is not present.
If an expansion device provides hardware which operates compatibly,
than it can install the HW address into this pointer at boot time,
and the system will use it.
This pointer may be used for direct access to the chunky-to-planar
conversion HW, if more is desired than the straight chunky-pixel
copy that is performed by WriteChunkyPixels().
If using the hardware directly, it should only be accessed when
the task using it has control of the blitter (via OwnBlitter()),
since this is the locking used to arbitrate usage of this device.
The hardware may be viewed as a device which accepts 32 8-bit
chunky pixels and outputs 8 longwords of bitplane data.
For proper operation, exactly 8 longwords (containing 32 pixels)
of chunky data should be written to *(GfxBase->ChunkyToPlanarPtr).
After the data is written, bitplane data (starting with plane 0)
can be read back a longword at a time. There is no need to read
back all 8 longwords if the high-order bitplanes are not needed.
Since WriteChunkyPixels is not (currently) particularly fast on
systems without the chunky-to-planar hardware, time critical
applications (games, etc) may want to use their own custom conversion
routine if GfxBase->ChunkyToPlanarPtr is NULL, and call
WriteChunkyPixels() otherwise.
This pointer is only present in GfxBase in versions of graphics.library
>= 40, so this should be checked before the pointer is read.

BUGS

	Not very fast on systems without chunky-to-planar conversion
hardware.

SEE ALSO

WritePixel(), <graphics/rastport.h>

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Rebels

PDX
KEF
TRSI
RBS

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se