Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gslop(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

gslop

Purpose

     Specifies the logical operation used when drawing lines.

C Syntax

     int gslop_ (operation)

     int *operation;

FORTRAN Syntax

     INTEGER function gslop (operation)

     INTEGER operation

Pascal Syntax

     FUNCTION gslop_ (

     VAR operation INTEGER;
     ): INTEGER [PUBLIC|;

Description

     The gslop subroutine specifies the logical operation used
     for  drawing the  GSL line-oriented,  fill, save/restore,
     and polymarker primitives. It does  not apply to the text
     primitives.

     Parameters

     operation         Indicates  the   logical  operation  to
                       perform  between  the  primitive  being
                       drawn and  the current contents  of the
                       frame buffer.

                       In the following table, please note:

                       o   The source pixels represent bits of
                           data to be merged  in some way with
                           the corresponding  bits of  data in
                           the destination rectangle.

                       o   The  first  three  columns  of  the
                           table  specify  the operations  you
                           can  perform, and  the Code  column
                           contains  the  corresponding  value
                           you should  specify for  the opera-
                           tion parameter.

                       o   A ~ (tilde) represents  the logical
                           INVERSE.

                               Type of     Logical          Type of                Code
                               Source      Operation        Destination

                                                             Destination clear      0
                                                             Set Destination       15
                                           No operation      Destination            5
                                                            ~Destination           10
                                Source     REPLACE           Destination            3
                                Source     AND               Destination            1
                                Source     AND              ~Destination            2
                                Source     Exclusive-or      Destination            6
                                Source     OR                Destination            7
                                Source     OR               ~Destination           11
                               ~Source     REPLACE           Destination           12
                               ~Source     AND               Destination            4
                               ~Source     AND              ~Destination            8
                               ~Source     Exclusive-or      Destination            9
                               ~Source     OR                Destination           13
                               ~Source     OR               ~Destination           14

                  Replace (3) is the default logical operation.

Currently, the  GSL provides  only replace  and exclusive-or  (codes 3  and 6
respectively) for displays other than the  IBM 5081 Display.  The full set of
logical operations is supported for the IBM 5081 Display.

For printers and plotters, the operations performed are the same as those for
displays, except that a value of "0" turns the color off, and a value of "15"
changes the color to white.

The GSL performs  each of the boolean  operations for each bit  of the source
and  destination color  values enabled  by  the plane  mask. The  destination
receives the color value that results from the operation.

The logical operations are performed on the color index rather than the color
itself.  This can cause some operations  on color displays to produce results
that are not expected.

Return Value

GS_SUCC   Successful.
GS_LONS   Logical operation not supported.

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