Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Today's Messages (off)  | Unanswered Messages (on)

Forum: U++ TheIDE: Layout (Forms) Designer
 Topic: How to plot a PIE chart in Form?
How to plot a PIE chart in Form? [message #57274] Tue, 22 June 2021 17:22
sinpeople is currently offline  sinpeople
Messages: 23
Registered: October 2020
Location: Singapore
Promising Member

Hi folks,

I am curious if there is any pie chart control already.

I have three data (60, 60, 60), which separate a circle's to 3x 120degree area from its centre.

Thank you!


Best Regards
David WANG
Forum: LineEdit, EditFields, DocEdit
 Topic: [BUG] LineEdit text renderer fails to correctly highlight underlined text .
[BUG] LineEdit text renderer fails to correctly highlight underlined text . [message #57247] Wed, 16 June 2021 15:10
Oblivion is currently offline  Oblivion
Messages: 921
Registered: August 2007
Experienced Contributor
Hi,

The problem: sOptimizedTextRenderer fails to render text attributes correctly on some cases (if underline attribute is involved).

Reason seems to be the non-continous text chunk rendering. When some underline text have other text with no underline attribute in between, the renderer does not erase the underline correctly.


Sscreenshot:

index.php?t=getfile&id=6471&private=0


Test code:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyLineEdit : LineEdit {
	void  HighlightLine(int, Vector<Highlight>& hl, int64) override {
		for(Highlight& h : hl) {
			h.font.Underline(h.chr == 'U');
			h.font.Bold(h.chr == 'B');
			h.font.Italic(h.chr == 'I');
		}
	};
};
struct MyApp : TopWindow {
	MyLineEdit edit;
	MyApp()
	{
		Sizeable().Zoomable().CenterScreen().SetRect(0,0, 1024, 800);
		Add(edit.SizePos());
		edit.SetFont(Monospace().Height(32));
		edit.Append(WString("UUU BBB III BBB\n"));
		edit.Append(WString("UUU BBB III UUU\n")); // Fail: Draws underline in between even if the underline attribute is disabled.
	}
};

GUI_APP_MAIN
{
	MyApp().Run();
}










Best regards,
Oblivion


[Updated on: Wed, 16 June 2021 15:12]

Report message to a moderator




Current Time: Wed Jun 23 13:12:02 CEST 2021

Total time taken to generate the page: 0.01051 seconds