Refactor: resolution_scale in graph_draw.cc #111037
|
@ -1006,6 +1006,7 @@ static void add_extrapolation_point_right(FCurve *fcu,
|
|||
|
||||
curve_vertices.append(vertex_position);
|
||||
}
|
||||
|
||||
/** Calculate how many points are needed per unit of the visible range of the View2D based on its
|
||||
nathanvegdahl marked this conversation as resolved
Outdated
|
||||
* pixel size. */
|
||||
static blender::float2 calculate_points_per_unit(View2D *v2d)
|
||||
|
|
Loading…
Reference in New Issue
Maybe:
That way it's a little clearer what kind of points we're talking about and for what purpose.
I'm also realizing that it feels to me like the variable
points_per_pixel
should either be a function parameter, or it shouldn't exist at all (i.e. just substitute 1.0, and then the function becomespixels_per_unit()
). Maybe that's too much for what's supposed to be a tiny PR, though.Good point changing it to
pixels_per_unit
That is actually what I need for #110788 as well
The
points_per_pixel
I'd like to keep but that can be moved into thecalculate_bezt_draw_resolution
functionIf I set that to 1 it would make 4 times the amount of points impacting performance
Yes the patch bloated a bit, but it is for good reason :)