« Back to AAU Project

ADOxx-graphical user interface

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
ADOxx-graphical user interface
community graphrep documentation
Answer
3/27/14 11:11 AM
  1. How can we create a graphical element combined with an image (jpg, png, etc) in ADOxx development tool kit?
  2. How can we see the global architecture of our views in ADOxx?

RE: ADOxx-graphical user interface
Answer
10/16/13 9:15 AM as a reply to Fadi.
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
Attachment

Attachment

Attachments: Dart_scaled.png (11.8k), GOAL ADOxx Representation.PNG (10.8k)

RE: ADOxx-graphical user interface
graphrep rotate image
Answer
7/10/20 8:39 AM as a reply to Wilfrid Utz.
Hello Wilfrid,

Is it possible to rotate the loaded image or do i need to load different pictures to implement a rotation function ?

Currently i have implemented the "rotation function following":
...
IF (rot="0°")
{
SET filenameemoticon"db:\\resistor.png")
}
ELSIF (rot="90°")
{
SET filenameemoticon"db:\\resistor90.png")
}
...

BR
Martin