Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Pg--Graphics

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Pg--Graphics

[Previous] [Contents] [Index] [Next]

Pg--Graphics

Ab ¦ Al ¦ Ap ¦ mbstr ¦ Pd ¦ Pf ¦ Pg ¦ Ph ¦ Pi ¦ Pm ¦ Pp ¦ Pt ¦ Px ¦ Rt ¦ utf8 ¦ wc

Most Photon graphics functions append draw commands to a buffer. The application sends these commands to the Photon Manager, which in turn sends them to the graphics driver. The graphics driver then renders the commands on the screen.

Photon supports a set of simple, dual-purpose draw primitives that you can stroke (that is, draw as an outline) or fill, or both. These primitives include arcs, ellipses, polygons, rectangles, and rounded rectangles.

For fast animation, you can use the Pg... and Pd... functions.


Note: If you're building a GUI, you should use widgets whenever possible instead of calling the Pg* functions directly. Widgets handle interaction with the user and look after redrawing themselves when damaged.

If you need to do raw drawing in an application that uses widgets, create a PtRaw widget, and call the drawing primitives in its draw function. For more information, see the Raw Drawing and Animation
chapter of the Photon Programmer's Guide.


Many of the Pg...() functions have multiple versions, distinguished by their suffix:

  • Pg*() -- standard function, which operates on the current draw or graphics context. It is implemented as a macro for its corresponding Pg*Cx() version, if there is one.
  • Pg*Cx() -- you can specify the draw or graphics context. If the first argument is a void *, it takes a draw context. If the first argument is a PhGC_t *, it takes a graphics context.
  • Pg*v() and Pg*Cxv() -- the data isn't physically copied into the draw buffer. Instead, a pointer to the array is stored until the draw buffer is flushed. Make sure you call PgFlush() before you modify the array contents. The Pg*Cxv() are the same as versions Pg*Cx() in that they take a draw or graphics context as the first argument.

The Pg*mx() functions in the library are deprecated, and have been replaced with Pg*v() versions.

PgAlphaOff*()
PgAlphaOn*()
PgAlphaValue()
PgARGB()
PgBackgroundShadings()
PgBevelBox*()
PgBlit*()
PgBlueValue()
PgCalcColorContrast()
PgChromaOff*()
PgChromaOn*()
PgClearDrawBuffer*()
PgClearTranslation*()
PgCMY()
PgColor_t
PgColorHSV_t
PgColorMatch()
PgConfigScalerChannel()
PgContextBlit*()
PgContextBlitArea*()
PgContrastBevelBox*()
PgCreateDriverRegion()
PgCreateGC()
PgCreateGradient() -- deprecated
PgCreateLayerSurface()
PgCreateVideoChannel()
PgDefaultAlpha()
PgDefaultChroma()
PgDefaultFill()
PgDefaultGC()
PgDefaultMode()
PgDefaultStroke()
PgDefaultText()
PgDestroyGC()
PgDestroyVideoChannel()
PgDrawArc*()
PgDrawArrow*()
PgDrawBevelBox*()
PgDrawBeveled*()
PgDrawBezier*()
PgDrawBitmap*()
PgDrawEllipse*()
PgDrawGradient*()
PgDrawGradientBevelBox*()
PgDrawGrid*()
PgDrawIBevelBox*()
PgDrawILine*()
PgDrawImage*()
PgDrawIPixel*()
PgDrawIRect*()
PgDrawLine*()
PgDrawMultiTextArea*()
PgDrawPhImage*()
PgDrawPhImageRect*()
PgDrawPixel*()
PgDrawPixelArray*()
PgDrawPolygon*()
PgDrawRect()
PgDrawRepBitmap*()
PgDrawRepBitmapmx() -- deprecated, use PgDrawRepBitmapv()
PgDrawRepImage*()
PgDrawRepImagemx() -- deprecated, use PgDrawRepImagev()
PgDrawRepPhImage*()
PgDrawRepPhImagemx() -- deprecated, use PgDrawRepPhImagev()
PgDrawRoundRect*()
PgDrawSpan*()
PgDrawSpanmx() -- deprecated, use PgDrawSpanv()
PgDrawString*()
PgDrawStringmx() -- deprecated, use PgDrawStringv()
PgDrawText*()
PgDrawTextArea*()
PgDrawTextChars*()
PgDrawTextmx() -- deprecated, use PgDrawTextv()
PgDrawTImage*()
PgDrawTImagemx() -- deprecated, use PgDrawTImagev()
PgDrawTrend*()
PgDrawTrendmx() -- deprecated, use PgDrawTrendv()
PgExtentMultiText*()
PgExtentText()
PgFFlush*()
PgFlush*()
PgGetColorModel*()
PgGetGC*()
PgGetGradientColor() -- deprecated
PgGetGraphicsHWCaps()
PgGetLayerCaps()
PgGetOverlayChromaColor()
PgGetPalette()
PgGetRegion*()
PgGetScalerCapabilities()
PgGetVideoMode()
PgGetVideoModeInfo()
PgGetVideoModeList()
PgGradientLinear() -- deprecated
PgGradientMakeImage() -- deprecated
PgGradientPercent() -- deprecated
PgGradientRotatePalette() -- deprecated
PgGray()
PgGrayValue()
PgGreenValue()
PgHSV()
PgHSV2RGB()
PgLayerCaps_t
PgLockLayer()
PgMap_t
PgNextVideoFrame()
PgReadScreen()
PgReadScreenSize()
PgRedValue()
PgRGB()
PgRGB2HSV()
PgScalerCaps_t
PgScalerProps_t
PgSetAlpha*()
PgSetAlphaBlend*()
PgSetChroma*()
PgSetClipping*()
PgSetColorModel*()
PgSetDPMSMode()
PgSetDrawBufferSize*()
PgSetDrawMode*()
PgSetFillColor*()
PgSetFillDither*()
PgSetFillTransPat*()
PgSetFillXORColor*()
PgSetFont*()
PgSetGC*()
PgSetLayerArg()
PgSetLayerSurface()
PgSetMultiClip*()
PgSetPalette*()
PgSetPlaneMask*()
PgSetRegion*()
PgSetStrokeCap*()
PgSetStrokeColor*()
PgSetStrokeDash*()
PgSetStrokeDither*()
PgSetStrokeFWidth*()
PgSetStrokeJoin*()
PgSetStrokeTransPat*()
PgSetStrokeWidth*()
PgSetStrokeXORColor*()
PgSetTextColor*()
PgSetTextDither*()
PgSetTextTransPat*()
PgSetTextXORColor*()
PgSetTranslation*()
PgSetUnderline*()
PgSetUserClip*()
PgSetUserClipAbsolute*()
PgSetVideoMode()
PgShmemAttach()
PgShmemCleanup()
PgShmemCreate()
PgShmemDestroy()
PgShmemDetach()
PgSwapDisplay*()
PgUnlockLayer()
PgVideoChannel_t
PgWaitDrawComplete()
PgWaitHWIdle()
PgWaitVSync*()

Ab ¦ Al ¦ Ap ¦ mbstr ¦ Pd ¦ Pf ¦ Pg ¦ Ph ¦ Pi ¦ Pm ¦ Pp ¦ Pt ¦ Px ¦ Rt ¦ utf8 ¦ wc


[Previous] [Contents] [Index] [Next]

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026