[Oberon] FPGA - Pictures.Mod composition

Tomas Kral thomas.kral at email.cz
Tue Sep 26 20:25:25 CEST 2017


Hi,

Looking at these two structures, I am scratching my head, is a
picture `kind of' bitmap, or `makes use of' bitmap, as we repeat
fields: width, height, depth, and base, while only adding colour table?

TYPE
  Bitmap* = POINTER TO BitmapDesc;
  BitmapDesc* = RECORD
    width*, height*, depth*: INTEGER;
    base*: INTEGER;
    size*: INTEGER
  END;

TYPE
Picture* = POINTER TO PictureDesc;
    PictureDesc* = RECORD
      width*, height*, depth*: INTEGER;
      bitmap: Bitmaps.Bitmap;
      base: INTEGER;
      ct: ColorTable
    END;

Should we not just extend it?

TYPE
PictureDesc* = RECORD (Bitmaps)
     ct: ColorTable
   END;

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list