scaling fix, little refactoring

This commit is contained in:
danya
2021-05-13 16:28:07 +03:00
parent cff1d0e2ac
commit 62e0ca27d1
4 changed files with 3592 additions and 3573 deletions

View File

@ -131,8 +131,6 @@ namespace agg
// //return ginfo.shading.function.get_x_max() + 1;
// }
float a = (r1 - r0) * (r1 - r0) - (p1.x - p0.x) * (p1.x - p0.x) - (p1.y - p0.y) * (p1.y - p0.y);
float b = 2 * r0 * (r1 - r0) + 2 * (p1.x - p0.x) * (x - p0.x) + 2 * (p1.y - p0.y) * (y - p0.y);
@ -271,6 +269,7 @@ namespace agg
}
virtual float eval(float x, float y) override
{
float t = (x - p0.x) * (p1.x - p0.x) + (y - p0.y) * (p1.y - p0.y);
t /= (p1.x - p0.x) * (p1.x - p0.x) + (p1.y - p0.y) * (p1.y - p0.y);

View File

@ -405,7 +405,7 @@ namespace NSStructures
ginfo.continue_shading_f = continue_shading_f;
ginfo.continue_shading_b = continue_shading_b;
ginfo.shading.function = ColorFunction<agg::rgba8>(515, t0, t1);
ginfo.shading.function = ColorFunction<agg::rgba8>(512, t0, t1);
ginfo.shading.set_two_points = true;
ginfo.shading.point1 = p1;

File diff suppressed because it is too large Load Diff

View File

@ -143,7 +143,7 @@
<number>50</number>
</property>
<property name="maximum">
<number>300</number>
<number>600</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -179,7 +179,7 @@
<x>0</x>
<y>0</y>
<width>851</width>
<height>20</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuPDF_viewer">