DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦810294f87⟧ Ada Source

    Length: 16384 (0x4000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Xlbp_Image, seg_004f6e

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



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.
------------------------------------------------------------------------------

--\x0c
    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;  

E3 Meta Data

    nblk1=f
    nid=0
    hdr6=1e
        [0x00] rec0=1b rec1=00 rec2=01 rec3=032
        [0x01] rec0=11 rec1=00 rec2=02 rec3=028
        [0x02] rec0=0e rec1=00 rec2=03 rec3=080
        [0x03] rec0=0f rec1=00 rec2=04 rec3=004
        [0x04] rec0=10 rec1=00 rec2=05 rec3=072
        [0x05] rec0=0e rec1=00 rec2=06 rec3=02a
        [0x06] rec0=0f rec1=00 rec2=07 rec3=014
        [0x07] rec0=17 rec1=00 rec2=08 rec3=022
        [0x08] rec0=12 rec1=00 rec2=09 rec3=01a
        [0x09] rec0=12 rec1=00 rec2=0a rec3=048
        [0x0a] rec0=13 rec1=00 rec2=0b rec3=012
        [0x0b] rec0=11 rec1=00 rec2=0c rec3=022
        [0x0c] rec0=0f rec1=00 rec2=0d rec3=070
        [0x0d] rec0=14 rec1=00 rec2=0e rec3=012
        [0x0e] rec0=0c rec1=00 rec2=0f rec3=000
    tail 0x21500961481978296dd76 0x42a00088462063203