[Oberon] FPGA - Pictures.Mod composition
Jörg
joerg.straube at iaeth.ch
Tue Sep 26 20:55:55 CEST 2017
indeed, we could. With your propsal Pictures are supersets of Bitmaps and hence type compatible (meaning PROCEDUREs accepting Bitmaps could accept Pictures as well, not the otherway around)
With the existing separate type definitions, types are not compatible.
Jörg
> Am 26.09.2017 um 20:25 schrieb Tomas Kral <thomas.kral at email.cz>:
>
> 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>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list