Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
For my glvg project i use gradient fills. Fills are applied using the stencil buffer e.g. first the shape is drawn in the stencil buffer next the fill is drawn over that.
Now that goes ok for not rotated fills on square shapes. But goes wrong with a rotated shape on a rectangular shape. (with and height are different).
So if i rotate a fill 90 degrees with and height will 'swap' making the fill not fill the entire shape. So somehow i need adjust sizes of the rotated fill so that it overlaps the shape again.
I have been puzzling with this for a while and so far i have not found a 'good enough' solution. If you have ideas on this let me know...
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
solved...
it also involved rotating around a point.
i use gltranslatef and glrotatef also i do a manual rotatation around a point to get the correct new x point. Both methods were a bit out of sync and i had some nasty left over code in the box drawing that overruled the outcome coords partly, next i 'fixed' a part that was correct in the first place and i got some chaos .
Lessons learned. Keep your code clean and simple as possible ...
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.