In general, I wanted to make something like a line running on a smooth sine wave on GDI +. But I still didn’t understand how to correctly rotate each next letter there so that the text would turn out along the desired curve. There you can twist the output area relative to any point, but I didn’t find anything suitable for this purpose ... Do you really need to move the center of rotation along a sinusoid and calculate a tangent to it for each letter to set the angle? Anyway, some kind of nonsense is obtained, because there, along with the tilt of the next frame, the entire previous picture is tilted.
- Maybe after twisting the output area and outputting the text, you need to return everything back? - kot-da-vinci
- But this is double the cost, and so after each character, the rotation of the canvas, and then back again! I'll do it for now through WinAPI using CreateFont for each next character. stackoverflow.com/questions/20934754/… - Isaev
- In my opinion, the "rotation of the canvas" is worth nothing compared to CreateFont in terms of resource costs. Rotation only implies setting a new transformation matrix, which in any case will be applied to the next drawing operation. At least in DirectX and in the usual GDI, like, too. - kot-da-vinci
- for good, yes, it should be, but GDI is not DirectX. This will then need to be tested separately in order to draw any conclusions about the speed - Isaev
- oneGDI + and DirectX are related technologies. - kot-da-vinci
|