783 views
in GUI Development by

Hello,

I would draw a StrokePath within inherited Draw() method from Charts::Graph.

Added an ArcPath variable to my Graph class and the code for the StrokePath in Draw():

/* draw arc */
aCanvas.StrokePath( aClip, ArcPath, dstRect, false, offset, 2.0, Graphics::PathCap.Flat, Graphics::PathCap.Flat, Graphics::PathJoin.Bevel, 3.0, Constant::GraphArcColor, Constant::GraphArcColor, Constant::GraphArcColor, Constant::GraphArcColor, true, true );

I'm using an instance of the Graph class in other View like below:

/* set arc properties */
Graph.ArcPath.Radius = 10.0 * (float) Graph.PixelPerUnit.x;

There is no ploblem if the Radius is small enough or simulated on the PC. But when the Radius is bigger than some value on a real board(STM32F746-DISCO), the StrokePath is not drawn and I can get an ERROR from the serial monitor:

[ERROR in ewgfx.c:4641] The 'IssueBuffer' for destination bitmap 0xC00E2B68 is too small for polygon data with '2575' entries. Adjust in your project the macro definition EW_MAX_ISSUE_TASKS and rebuild the Graphics Engine. You can also try to simplify the original path information.

 

Could you give any idea for the issue?

Thank you in advance,

Sj

1 Answer

0 votes
by

Hello,

first of all, there should be no need to implement your own Draw() method - you can use the StrokePath view to show your path data.

According to the error message, your path contains 2575 edges which is really a high amount of edges compared to the display size of 480x272 pixels. In case you create some arcs programmatically, you should limit the number of edges when calling AddArc(). In case you are using an Arc Path data object, you can limit the number of path edges.

Per default, the define EW_MAX_ISSUE_TASKS is set to 100, which creates an IssueBuffer with 100 issues (each is 64 bytes), which is sufficient for almost 800 edges.

In order to increase the size of the IssueBuffer, it would be necessary to place the following define into the makefile and rebuild the Graphics Engine and the UI project:

-DEW_MAX_ISSUE_TASKS=350

Then you have enough place to operate with 2800 edges...

Important: The libraries of the free evaluation edition and of the Small Business Edition are already compiled with an IssueBuffer size of 100.

These changes can only be done with the Professional Edition.

Best regards,

Manfred.

 

by

Just an additional remark: In order to change the settings also for the libraries of Free Evaluation Edition and Small Business Edition, you can place the following code within your main.c file:

At the beginning make the following declaration:

extern int EwMaxIssueTasks;

Then, within main(), make the following assignment before calling EwInitGraphicsEngine():

EwMaxIssueTasks = 350; /* or want you need */

Best regards,

Manfred.

 

by
Dear Manfred,

Limiting the edges was really successful! Now everything is working well.

Before I had the question, I noticed that it is not available to rebuild the Graphic Engine because I'm using the Small Business Edition.
But you also gave the very useful idea.

I really appreciate you and EmWiz team dedicated supporting.

Best Regards,

Sj

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...