Dear Fadi,
thank you for your questions. Please find an example implementation on item 1) below, including a brief explanation on how to realize this is ADOxx. For the preparation of this example the following steps were performed:
a) The box is drawn using GRAPHREP code directly, centered in coordinate system to make sure that the relations are nicely presented
b) Scaled the image provided to fit into the scale. I did that as a step outside of ADOxx using any type of graphics programme (e.g. GIMP)
c) Imported the image in the ADOxx DB using the File managment function for the library
d) Added the image in the top right corner, using correct aspect representation (see the calculations of width and height in the code)
e) Added the decomposition "diamond" and plus sign using GRAPHREP
1GRAPHREP
2SHADOW off
3# draw the rounded rectangle as the body of the class
4PEN color:darkgreen w:.06cm
5FILL color:lightgray
6ROUNDRECT x:-2cm y:-1cm w:4cm h:2cm rx:.25cm ry:.25cm
7# define the file location, read from the files managed by ADOxx
8SET filename: ("db:\\Dart_scaled.png")
9# read bitmap info for sizing
10BITMAPINFO (filename)
11#keep the aspect ratio
12# draw the graphic
13BITMAP (filename) x:1cm y:-2.1cm w: (bmpwidth / 96 * 2.54cm) h: (bmpheight / 96 * 2.54cm)
14# optional, for decomposition
15POLYGON 4 x1:-0.4cm y1:0.5cm y2:0.9cm x3:0.4cm y3:0.5cm y4:0.1cm
16FONT h:20pt color:darkgreen
17TEXT "+" y:0.5cm w:c h:c