New object for drawing geometric shapes

The visualization of key figures or processes can be realized in conzept 16 with different objects. Depending on the application, there may also be a requirement to draw simple geometric shapes such as lines, circles or rectangles. This was previously not possible…

In order to be able to implement this requirement, there will be a new surface object from the upcoming conzept 16 version. This can be used to create the following shapes:

  • Rectangles
  • Squares
  • Circles
  • Ovals
  • Lines

The basis for drawing graphic objects is the canvas object, a surface for drawing or creating vector-based graphic objects. In the current version, the “canvas” and the graphic objects to be drawn are created exclusively at runtime. In a later version, the canvas object will be included in the object palette of conzept 16 Designer.

All objects have attributes that can be used to determine the appearance. These include, for example, selection of the font, color and line width of the frame or the fill color. It is even possible to use a background image.

Positions and sizes are specified in logical coordinates, analogous to the conzept 16 print objects. This has the advantage that the display is based on device-independent units (e.g. millimetres or centimetres).

In the following example, the relationship between the entities “museum” and “artwork” is mapped using the canvas object.

define
{
  // Conversion into logical units
  mLogRect(l,t,r,b,u) : RectMake(PrtUnitLog(CnvFI(l),u),PrtUnitLog(CnvFI(t),u),PrtUnitLog(CnvFI(r),u),PrtUnitLog(CnvFI(b),u))
}

sub CreateGraphic
(
  aCvs      : handle;
  aType     : int;
  aCaption  : alpha;
  aRect     : rect;
)

local
{
  tCvg  : handle;
  tFont : font;
}

{
  // Create graphic object
  tCvg # WinCreate(_WintypeCanvasGraphic,'','',aCvs);
  
  switch (aType)
  {
    // Create graphic object
    case _WinFormTypeRectangle : tCvg->wpBorderColFg # _WinColLightRed;
    
    // Display the start and end point of the line as an arrow
    case _WinFormTypeLine  :
    {
      tCvg->wpLineCapStart # _WinLineCapArrowAnchor;
      tCvg->wpLineCapEnd   # _WinLineCapArrowAnchor;
    }
  }
  // Shape of the object
  tCvg->wpFormType # aType;
  
  // Font size
  tFont # tCvg->wpFont;
  tFont:size # 150;
  tCvg->wpFont # tFont;
  
  // Labeling
  tCvg->wpCaption # aCaption;
  
  // Position
  tCvg->wpArea # aRect;
}

// Create artboard
tCvs # WinCreate(_WinTypeCanvas,'','',tFrm);
// Graphic object of the type “Rectangle”
tCvs->CreateGraphic(_WinFormTypeRectangle,'Museum',mLogRect(1,2,7,4,_PrtUnitCentimetres));
// Graphic object of the type “Line” 
tCvs->CreateGraphic(_WinFormTypeLine,'1:n',mLogRect(7,2,12,4,_PrtUnitCentimetres));
// Graphic object of the type “Rectangle”
tCvs->CreateGraphic(_WinFormTypeRectangle,'Kunstwerk',mLogRect(12,2,18,4,_PrtUnitCentimetres));
Programming result: Museum 1:n Artwork(s)

Conclusion:

Processes can be illustrated particularly well using images and diagrams. Complex processes in particular can be analysed and understood more easily using virtualization. In addition to the conzept 16 objects such as GanttGraph, Chart and Picture, the Canvas object is another building block for professional process visualization, as is typically used in dashboard and cockpit solutions.

We have added a sample application to the code library with which the graphical objects can be created and the properties of the objects defined.

Klicken Sie hier, um die Nutzungsbedingungen für unseren Blog zu lesen.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Requests, questions or feedback are welcome:

Terms of use of the comment function in the blog

1. General information

Vectorsoft AG (‘Provider’) provides a public blog for Internet users (‘Users’) on the vectorsoft.de website. The public blog is intended for the exchange of information and ideas. Users who participate with contributions and comments undertake to comply with the blog terms of use and are responsible for the accuracy, appropriateness and freedom from legal infringements of their contributions. By using the comment function in our blog, you accept these terms of use.

2. Netiquette

We ask you to refrain from personal attacks and provocations based on other opinions. Please argue objectively and maintain a constructive discussion culture. Your comment should always be related to the topic in question in order to avoid digressions into other topics. Posting the same comment or several similar comments more than once is not permitted.

3. Prohibition of illegal content

By submitting your comment, you confirm that you are not violating any copyrights or other rights of third parties. Inciting, racist statements, instructions for criminal offences and their glorification, depictions of violence, pornographic content and statements that violate personal rights are prohibited.

4. No advertising

The use of the comment function is not permitted for commercial or party-political purposes. Advertising contributions of any kind will be deleted immediately.

5. Details of the name

When entering your name, pay attention to the principles mentioned above.

6. Source references

If you intend to publish quotes or contributions from third parties, please indicate the respective sources and explain how they relate to the blog post.

7. Violation of the terms of use

Posts that violate this policy will be deleted immediately. If you notice any violations yourself, please send us the link to the comment in question by e-mail to . We expressly point out that we will exclude individual users in the event of repeated or serious violations of these terms of use.

As of: Sept. 2024

Get your Trial Version now!

Test yeet free of charge

IHRE EVALUIERUNGSLIZENZ - JETZT ANFORDERN!

TESTEN SIE DIE CONZEPT 16 VOLLVERSION - UNVERBINDLICH und KOSTENFREI

Subscribe to our newsletter

[cleverreach_signup]
WordPress Cookie Notice by Real Cookie Banner