mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
scaling fix, little refactoring
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
@ -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
@ -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">
|
||||
|
||||
Reference in New Issue
Block a user