ellipsis placement via clipstring option

Report bugs with the Rainmeter application and suggest features.

ellipsis placement via clipstring option

October 17th, 2017, 6:35 am
2bndy5
   [10 posts]

My idea I want to contribute is letting the user specify the location of the ellipsis in the string of a meter by setting the clipstring option to 3 (for middle of string) or 4 (beginning of string).I've been looking at the source code for about a week now... It looks like I could modify trimming object (defined on line 399 of TextFormatD2D.cpp) to include a delimiter and delimiter count (starting from end of string). Therefore anything after the specified delimiter would be preserved and displayed after the ellipsis. MSDN Documentation

The clipstring option gets passed from MeterString.cpp onto TextFormatD2D.cpp via DrawString() but in the form of a boolean. It looks like the Boolean then determines the granularity argument of DWRITE_TRIMMING to Character (true) or none (false).

My thinking is if clipstring > 2 then set delimiting character and delimiter count (based on middle or beginning of string) and pass them along with the pre-existing Boolean from DrawSting(). I guess my question is: Should I create a DWRITE_TRIMMING object within DrawString() of MeterString.cpp or modify SetTrimming() within TextFormatD2D.cpp?
Furthermore, how do I determine the amount of characters displayed after clipping is applied? Is there a function in D2D that would help calculate this?

Re: ellipsis placement via clipstring option

October 22nd, 2017, 4:17 am
2bndy5
   [10 posts]

abandoned goal. preliminary test seemed to break clipstring functionality all together. :yawn:

Return to “Bugs & Feature Suggestions”



Who is online

Users browsing this forum: No registered users and 2 guests