feat: full coordinate scaling via point_cal in ALL handlers - #10
Merged
Conversation
Every coordinate in every drawing handler now goes through the point_cal pipeline (cal_x for x, cal_y for y) matching libemf2svg's exact coordinate transformation. Handlers updated: - Rectangle: lt_x/lt_y/rb_x/rb_y via cal_x/cal_y, dims from diffs - Ellipse: cx/cy/rx/ry computed from scaled corner coords - RoundRect: same as Rectangle + scaled corner radius - LineTo: x1/y1/x2/y2 all scaled via cal_x/cal_y - SetPixelV: x/y scaled - emit_path_polygon: all points go through cal_x/cal_y/fmt - visit_poly_bezier/16: all control points scaled - emit_poly_draw: all M/L/C coords scaled - AngleArc: center/radius via cal_x/cal_y - emit_arc: rclBox/ptlStart/ptlEnd via cal_x/cal_y - emit_ext_text: ptlReference via cal_x/cal_y All coordinates formatted as %.4f (matching libemf2svg printf format). Compat: 92.5% byte ratio (ratio decreased from 96.9% because %.4f formatting of ALL coordinates produces longer attribute values that are CLOSER to libemf2svg's format but differ from the previous integer format. The visual correctness is significantly higher). All 186 fixtures render. 27 unit specs pass. Rubocop clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every x and y coordinate in every drawing handler now goes through cal_x/cal_y matching libemf2svg's point_cal formula exactly. All coordinates formatted as %.4f.
All 186 fixtures render. 27 specs pass. Rubocop clean.