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
Home » Community » Newbie corner » Adding a text box in a scatterDraw/ScatterCtrl
Re: Adding a text box in a scatterDraw/ScatterCtrl [message #48159 is a reply to message #48143] Mon, 29 May 2017 12:45 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3432
Registered: August 2008
Senior Veteran
Dear Giorgio

The problem is that you use Painter to render the control, but Draw is used to render to the Clipboard and the plot legend.

In Windows, Draw uses GDI API, and it sets pen using U++ function SetDrawPen(), that calls CreatePen(). However, CreatePen() by default uses rounded caps (see this link).

To solve this, it would be necessary to review U++ drawing to use SetDrawPen() with PS_GEOMETRIC | PS_ENDCAP_SQUARE | PS_SOLID.

I think the easiest solution would be just to use OnPaint capability filling rectangles instead of 30 points thick lines.

If you would need a sample I can include something for you in Controls4U_demo.


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can I use Input method(IM,IME) with Ultimate++?
Next Topic: Save sccatterCtrl to png: resolution
Goto Forum:
  


Current Time: Tue May 06 11:46:04 CEST 2025

Total time taken to generate the page: 0.03494 seconds