DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦5042ac707⟧ TextFile

    Length: 14431 (0x385f)
    Types: TextFile
    Names: »V«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

with Xlbt_Arithmetic;  
use Xlbt_Arithmetic;  
with Xlbt_Basic;  
use Xlbt_Basic;  
with Xlbt_Image;  
use Xlbt_Image;  
with Xlbt_Visual;  
use Xlbt_Visual;

package Xlbp_Image is
------------------------------------------------------------------------------
-- X Library Images
--
-- Xlbp_Image - Used to create and manipulate images.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
-- Copyright 1987 - 1989 by Digital Equipment Corporation, Maynard, Mass.
-- Copyright 1987 - 1989 by Massachusetts Institute of Technology,
--                          Cambridge, Massachusetts.
--
--                  All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the names of Digital, MIT, or Rational
-- not be used in advertising or publicity pertaining to distribution of
-- the software without specific, written prior permission.
--
-- Digital, MIT, and Rational disclaim all warranties with regard to this
-- software, including all implied warranties of merchantability and fitness,
-- in no event shall Digital, MIT, or Rational be liable for any special,
-- indirect or consequential damages or any damages whatsoever resulting from
-- loss of use, data or profits, whether in an action of contract, negligence
-- or other tortious action, arising out of or in connection with the use or
-- performance of this software.
------------------------------------------------------------------------------

--\f

    function X_Create_Image (Display              : X_Display;  
                             Visual               : X_Visual;  
                             Depth                : U_Char;  
                             Format               : X_Image_Format;  
                             Offset               : U_Short;  
                             Data                 : U_Char_Array;  
                             Width                : U_Short;  
                             Height               : U_Short;  
                             Bitmap_Pad           : U_Char;  
                             Image_Bytes_Per_Line : U_Short) return X_Image;
------------------------------------------------------------------------------
--  Display               - Specifies the display to use.
--  Visual                - Specifies the visual type to use.
--  Depth                 - Specifies the depth of the image.
--  Format                - Specifies the image format.  X_Y_Pixmap or Z_Pixmap
--  Offset                - Specifies the number of pixels to ignore at the
--                          beginning of the scanline.  This permits the rapid
--                          displaying of the image without requiring each
--                          scanline to be shifted into position.
--  Data                  - Specifies the image data.
--  Width                 - Specifies the width, in pixels, of the image.
--  Height                - Specifies the height, in pixels, of the image.
--  Bitmap_Pad            - Specifies the quantum of a scanline.  The start of
--                          one scanline is separated in memory from the start
--                          of the next my a multiple of this many bits; 8, 16,
--                          or 32.
--  Image_Bytes_Per_Line  - Specifies the number of bytes in the image between
--                          the start of one scanline and the start of the
--                          next.  If a 0 is passed then Xlib will assume
--                          that the lines are contiguous and will compute
--                          this value itself.
--
-- Allocates the memory needed for the X_Image and initializes it.  This
-- function does not allocate space for the image itself.
------------------------------------------------------------------------------

    function X_Create_Image (Display              : X_Display;  
                             Visual               : X_Visual;  
                             Depth                : U_Char;  
                             Format               : X_Image_Format;  
                             Offset               : U_Short;  
                             Data                 : U_Char_List;  
                             Data_Is_Shared       : Boolean;  
                             Width                : U_Short;  
                             Height               : U_Short;  
                             Bitmap_Pad           : U_Char;  
                             Image_Bytes_Per_Line : U_Short) return X_Image;
------------------------------------------------------------------------------
--  Display               - Specifies the display to use.
--  Visual                - Specifies the visual type to use.
--  Depth                 - Specifies the depth of the image.
--  Format                - Specifies the image format.  X_Y_Pixmap or Z_Pixmap
--  Offset                - Specifies the number of pixels to ignore at the
--                          beginning of the scanline.  This permits the rapid
--                          displaying of the image without requiring each
--                          scanline to be shifted into position.
--  Data                  - Specifies the image data.  This list pointer is
--                          placed into the new X_Image.  Do not free it
--                          or the X_Image will be left with a dangling pointer.
--  Data_Is_Shared        - Specifies True if the Data is to be shared outside
--                          the new X_Image and should not be deallocated when
--                          the X_Image is deallocated.  False means deallocate
--                          the Data when the X_Image is deallocated.
--  Width                 - Specifies the width, in pixels, of the image.
--  Height                - Specifies the height, in pixels, of the image.
--  Bitmap_Pad            - Specifies the quantum of a scanline.  The start of
--                          one scanline is separated in memory from the start
--                          of the next my a multiple of this many bits; 8, 16,
--                          or 32.
--  Image_Bytes_Per_Line  - Specifies the number of bytes in the image between
--                          the start of one scanline and the start of the
--                          next.  If a 0 is passed then Xlib will assume
--                          that the lines are contiguous and will compute
--                          this value itself.
--
-- Allocates the memory needed for the X_Image and initializes it.  This
-- function does not allocate space for the image itself.
------------------------------------------------------------------------------


    procedure X_Destroy_Image (Image : in out X_Image);

------------------------------------------------------------------------------
--  Image    - Specifies the image to use.
--
-- Frees/destroys an X_Image and deallocates all storage associated with it.
------------------------------------------------------------------------------

    procedure X_Add_Pixel (Image : X_Image;  
                           Value : X_Pixel);
------------------------------------------------------------------------------
--  Image   - Specifies the image to use.
--  Value   - Specifies the pixel value to use.
--
-- Adds a constant value to every pixel in an image.
------------------------------------------------------------------------------

    function X_Get_Pixel (Image : X_Image;  
                          X     : S_Short;  
                          Y     : S_Short) return X_Pixel;
------------------------------------------------------------------------------
--  Image   - Specifies the image to use.
--  X       - Specifies the X coordinate within the image.
--  Y       - Specifies the Y coordinate within the image.
--
-- Returns the pixel value at the X/Y coordinates.  They are relative to the
-- origin [0,0] of the image.  The pixel value returned is in normalized
-- format; the least significant bytes of the long (32-bit) value is in the
-- least significant byte of the pixel (obtainable via "pixel mod 2**8").
------------------------------------------------------------------------------

    procedure X_Put_Pixel (Image : X_Image;  
                           X     : S_Short;  
                           Y     : S_Short;  
                           Pixel : X_Pixel);
------------------------------------------------------------------------------
--  Image   - Specifies the image to use.
--  X       - Specifies the X coordinate within the image.
--  Y       - Specifies the Y coordinate within the image.
--  Pixel   - Specifies the new pixel value.
--
-- Sets the pixel value at the X/Y coordinates.  They are relative to the
-- origin [0,0] of the image.  The pixel value is in normalized format; the
-- least significant bytes of the long (32-bit) value is in the least
-- significant byte of the pixel (obtainable via "pixel mod 2**8").
------------------------------------------------------------------------------

    function X_Sub_Image (Image  : X_Image;  
                          X      : S_Short;  
                          Y      : S_Short;  
                          Width  : U_Short;  
                          Height : U_Short) return X_Image;
------------------------------------------------------------------------------
--  Image   - Specifies the image to use.
--  X       - Specifies the X coordinate within the image.
--  Y       - Specifies the Y coordinate within the image.
--  Width   - Specifies the width of the subimage.
--  Height  - Specifies the height of the subimage.
--
-- Creates a new image that is a subsection of an existing one.  It allocates
-- the memory necessary for the new X_Image and returns it.  Uses repetitive
-- calls on Get/Put pixel and may be very slow.
------------------------------------------------------------------------------

    function X_Get_Image (Display    : X_Display;  
                          Drawable   : X_Drawable;  
                          X          : S_Short;  
                          Y          : S_Short;  
                          Width      : U_Short;  
                          Height     : U_Short;  
                          Plane_Mask : X_Plane_Mask;  
                          Format     : X_Image_Format) return X_Image;
------------------------------------------------------------------------------
--  Display     - Specifies the display to use.
--  Drawable    - Specifies the drawable to use (Window, Pixmap).
--  X           - Specifies the X coordinate of the rectangle in the drawable.
--  Y           - Specifies the Y coordinate of the rectangle in the drawable.
--  Width       - Specifies the width, in pixels, of the rectangle.
--  Height      - Specifies the height, in pixels, of the rectangle.
--  Plane_Mask  - Specifies the plane mask to sue in creating the image.
--  Format      - Specifies the desired format.
--
-- Combines an image in memory with a rectangle of the specified drawable.
------------------------------------------------------------------------------

    procedure X_Get_Sub_Image (Display    : X_Display;  
                               Drawable   : X_Drawable;  
                               X          : S_Short;  
                               Y          : S_Short;  
                               Width      : U_Short;  
                               Height     : U_Short;  
                               Plane_Mask : X_Plane_Mask;  
                               Format     : X_Image_Format;  
                               Image      : X_Image;  
                               Image_X    : S_Short;  
                               Image_Y    : S_Short);
------------------------------------------------------------------------------
--  Display     - Specifies the display to use.
--  Drawable    - Specifies the drawable to use (Window, Pixmap).
--  X           - Specifies the X coordinate of the rectangle in the drawable.
--  Y           - Specifies the Y coordinate of the rectangle in the drawable.
--  Width       - Specifies the width, in pixels, of the rectangle.
--  Height      - Specifies the height, in pixels, of the rectangle.
--  Plane_Mask  - Specifies the plane mask to sue in creating the image.
--  Format      - Specifies the desired format.
--  Image       - Specifies the image to be updated.
--  Image_X     - Specifies the X coordinate of the destination rectangle.
--  Image_Y     - Specifies the Y coordinate of the destination rectangle.
--
-- Updates a rectangle within the existing image.
------------------------------------------------------------------------------

    procedure X_Put_Image (Display  : X_Display;  
                           Drawable : X_Drawable;  
                           Gc       : X_Gc;  
                           Image    : X_Image;  
                           Image_X  : U_Short;  
                           Image_Y  : U_Short;  
                           X        : S_Short;  
                           Y        : S_Short;  
                           Width    : U_Short;  
                           Height   : U_Short);
------------------------------------------------------------------------------
--  Display     - Specifies the display to use.
--  Drawable    - Specifies the drawable to use (Window, Pixmap).
--  Gc          - Specifies the graphics context to use.
--  Image       - Specifies the image you want combined with the rectangle.
--  Image_X     - Specifies the X coordinate of the rectangle in the image.
--  Image_Y     - Specifies the Y coordinate of the rectangle in the image.
--  X           - Specifies the X coordinate of the rectangle in the drawable.
--  Y           - Specifies the Y coordinate of the rectangle in the drawable.
--  Width       - Specifies the width, in pixels, of the rectangle.
--  Height      - Specifies the height, in pixels, of the rectangle.
--
-- Combines an image in memory with a rectangle of the specified drawable.
------------------------------------------------------------------------------

end Xlbp_Image;