d2dlib icon indicating copy to clipboard operation
d2dlib copied to clipboard

Cached TextBrush and FontFormat for Measure & Draw Text

Open Softwaretom007 opened this issue 2 years ago • 2 comments

Add D2DSolidColorTextBrush object and interface + extend MeasureText with D2DFontFormat fontFormat and D2DTextLayout textLayout + update Sample/MeasureAndDrawString + update FPS meter algorithm

MeasureAndDrawString yield 2x performance gain using cached SolidColorTextBrush and FontFormat.

Softwaretom007 avatar Feb 08 '23 12:02 Softwaretom007

@Softwaretom007 Thank you very much!

jingwood avatar Feb 08 '23 14:02 jingwood

Added more functionality (string layout, text antialiasing setup, optimized draw & fill rectangle and drawing unconnected lines - from array of points).

Softwaretom007 avatar May 04 '23 08:05 Softwaretom007

Very appreciate it!

jingwood avatar Aug 19 '24 03:08 jingwood