ScatterDraw: Improvements in how ZoomToFit readjusts reticle

git-svn-id: svn://ultimatepp.org/upp/trunk@12523 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2018-11-12 12:06:57 +00:00
parent 489c3ed1ae
commit 5b45e8ffc6
4 changed files with 51 additions and 41 deletions

View file

@ -32,7 +32,6 @@ ScatterDraw::ScatterDraw() {
fastViewX = false;
sequentialXAll = false;
zoomStyleX = zoomStyleY = TO_CENTER;
//maxMajorUnitsX = maxMajorUnitsY = 10;
SetMajorUnitsNum(5, 10);
Color(graphColor);
isPolar = false;
@ -48,7 +47,6 @@ ScatterDraw::ScatterDraw() {
legendRowSpacing = 5;
legendFont = GetStdFont();
linkedMaster = 0;
//multiPlot = false;
plotW = plotH = Null;
stacked = false;
serializeFormat = true;
@ -223,6 +221,7 @@ bool ScatterDraw::PointInLegend(Point &pt)
}
void ScatterDraw::AdjustMinUnitX() {
xMinUnit = xMinUnit0;
if (xMajorUnit > 0) {
if (xMinUnit < 0)
xMinUnit += (fabs(floor(xMinUnit/xMajorUnit)))*xMajorUnit;
@ -232,6 +231,7 @@ void ScatterDraw::AdjustMinUnitX() {
}
void ScatterDraw::AdjustMinUnitY() {
yMinUnit = yMinUnit0;
if (yMajorUnit > 0) {
if (yMinUnit < 0)
yMinUnit += (fabs(ceil(yMinUnit/yMajorUnit)) + 1)*yMajorUnit;
@ -241,6 +241,7 @@ void ScatterDraw::AdjustMinUnitY() {
}
void ScatterDraw::AdjustMinUnitY2() {
yMinUnit2 = yMinUnit20;
if (yMajorUnit2 > 0) {
if (yMinUnit2 < 0)
yMinUnit2 += (fabs(ceil(yMinUnit2/yMajorUnit2)) + 1)*yMajorUnit2;
@ -249,6 +250,27 @@ void ScatterDraw::AdjustMinUnitY2() {
}
}
void ScatterDraw::AdjustMajorUnitX() {
while (xRange/xMajorUnit > 1.2*xMajorUnitNum)
xMajorUnit *= 2;
while (xRange/xMajorUnit < xMajorUnitNum/1.5)
xMajorUnit /= 2;
}
void ScatterDraw::AdjustMajorUnitY() {
while (yRange/yMajorUnit > 1.2*yMajorUnitNum)
yMajorUnit *= 2;
while (yRange/yMajorUnit < yMajorUnitNum/1.5)
yMajorUnit /= 2;
}
void ScatterDraw::AdjustMajorUnitY2() {
while (yRange2/yMajorUnit2 > 1.2*yMajorUnitNum)
yMajorUnit2 *= 2;
while (yRange2/yMajorUnit2 < yMajorUnitNumScatterDraw/1.5)
yMajorUnit2 /= 2;
}
ScatterDraw &ScatterDraw::SetRange(double rx, double ry, double ry2) {
ASSERT(IsNull(rx) || rx > 0);
ASSERT(IsNull(ry) || ry > 0);
@ -256,17 +278,17 @@ ScatterDraw &ScatterDraw::SetRange(double rx, double ry, double ry2) {
if (!IsNull(rx)) {
xRange = rx;
xMajorUnit = xRange/xMajorUnitNum;
AdjustMajorUnitX();
AdjustMinUnitX();
}
if (!IsNull(ry)) {
yRange = ry;
yMajorUnit = yRange/yMajorUnitNum;
AdjustMajorUnitY();
AdjustMinUnitY();
}
if (!IsNull(ry2)) {
yRange2 = ry2;
yMajorUnit2 = yRange2/yMajorUnitNum;
AdjustMajorUnitY2();
AdjustMinUnitY2();
}
WhenSetRange();
@ -416,9 +438,9 @@ ScatterDraw &ScatterDraw::DoFitToData(bool horizontal, bool vertical, double fac
xRange = maxx - minx;
double deltaX = xMin - minx;
xMin -= deltaX;
xMinUnit += deltaX;
xMajorUnit = xRange/xMajorUnitNum;
AdjustMinUnitX();
AdjustMajorUnitX();
}
}
if (vertical) {
@ -429,8 +451,8 @@ ScatterDraw &ScatterDraw::DoFitToData(bool horizontal, bool vertical, double fac
yRange = maxy - miny;
double deltaY = yMin - miny;
yMin -= deltaY;
yMinUnit += deltaY;
yMajorUnit = yRange/yMajorUnitNum;
AdjustMajorUnitY();
AdjustMinUnitY();
}
if (miny2 != -DOUBLE_NULL) {
@ -440,8 +462,8 @@ ScatterDraw &ScatterDraw::DoFitToData(bool horizontal, bool vertical, double fac
yRange2 = maxy2 - miny2;
double deltaY2 = yMin2 - miny2;
yMin2 -= deltaY2;
yMinUnit2 += deltaY2;
yMajorUnit2 = yRange2/yMajorUnitNum;
AdjustMajorUnitY2();
AdjustMinUnitY2();
}
}
@ -457,7 +479,7 @@ ScatterDraw &ScatterDraw::DoFitToData(bool horizontal, bool vertical, double fac
ScatterDraw &ScatterDraw::Graduation_FormatX(Formats fi) {
switch (fi) {
case EXP: cbModifFormatX = cbModifFormatXGridUnits = THISBACK(ExpFormat); break;
case EXP: cbModifFormatX = cbModifFormatXGridUnits = THISBACK(ExpFormat); break;
case MON: cbModifFormatX = cbModifFormatXGridUnits = THISBACK(MonFormat); break;
case DY: cbModifFormatX = cbModifFormatXGridUnits = THISBACK(DyFormat); break;
default:break;
@ -1316,14 +1338,8 @@ void ScatterDraw::DoZoom(double scale, bool mouseX, bool mouseY) {
AdjustMinUnitX();
}
xRange *= scale;
double xmun = xRange/xMajorUnit;
if (xmun > 1.2*xMajorUnitNum) {
xMajorUnit *= 2;
xMinUnit = xMinUnit0;
} else if (xmun < xMajorUnitNum/1.5) {
xMajorUnit /= 2;
xMinUnit = xMinUnit0;
}
AdjustMajorUnitX();
AdjustMinUnitX();
lastxRange = xRange;
}
@ -1350,18 +1366,8 @@ void ScatterDraw::DoZoom(double scale, bool mouseX, bool mouseY) {
}
yRange *= scale;
yRange2 *= scale;
double ymun = yRange/yMajorUnit;
if (ymun > 2*yMajorUnitNum) {
yMajorUnit *= 2;
yMinUnit = yMinUnit0;
yMajorUnit2 *= 2;
yMinUnit2 = yMinUnit20;
} else if (ymun < yMajorUnitNum/2) {
yMajorUnit /= 2;
yMinUnit = yMinUnit0;
yMajorUnit2 /= 2;
yMinUnit2 = yMinUnit20;
}
AdjustMajorUnitY();
AdjustMinUnitY();
lastyRange = yRange;
}

View file

@ -1127,6 +1127,10 @@ protected:
void AdjustMinUnitY();
void AdjustMinUnitY2();
void AdjustMajorUnitX();
void AdjustMajorUnitY();
void AdjustMajorUnitY2();
bool PointInPlot(Point &pt);
bool PointInBorder(Point &pt);
bool PointInLegend(Point &pt);

View file

@ -966,12 +966,12 @@ w]_`&[* SetReticleFont]([@(0.0.255) const]_[_^Upp`:`:Font^ Font]_`&[*@3 fnt])&]
[s6;%- &]
[s5;:ScatterDraw`:`:SetReticleColor`(const Upp`:`:Color`&`):%- [_^ScatterDraw^ ScatterD
raw]_`&[* SetReticleColor]([@(0.0.255) const]_[_^Upp`:`:Color^ Color]_`&[*@3 col])&]
[s3; Sets [%-*@3 col] as reticle color..&]
[s3; Sets [%-*@3 col] as reticle color.&]
[s1; &]
[s6;%- &]
[s5;:ScatterDraw`:`:GetReticleColor`(`):%- [_^Upp`:`:Color^ Color]_`&[* GetReticleColor](
)&]
[s3; Gets reticle color.&]
[s3; Gets reticle color&]
[s1;%- &]
[s6;%- &]
[s5;:ScatterDraw`:`:SetDataPrimaryY`(int`,bool`):%- [@(0.0.255) void]_[* SetDataPrimaryY](

View file

@ -578,11 +578,11 @@ COMPRESSED
61,105,200,219,54,225,247,125,221,190,120,231,253,151,10,26,120,163,95,127,208,46,8,243,206,181,62,135,226,95,238,65,186,159,202,112,124,9,125,219,174,106,158,174,84,122,81,191,55,32,62,253,134,127,114,155,198,157,191,80,220,47,16,126,26,147,176,9,239,60,120,219,233,247,255,15,248,253,183,79,191,89,79,43,45,183,240,251,69,225,3,79,10,254,43,239,253,27,79,243,237,96,191,189,172,215,124,30,230,25,171,151,32,255,203,214,137,251,178,225,242,25,35,247,83,29,54,133,91,134,101,247,106,132,63,5,125,115,187,86,234,13,15,23,43,29,221,111,61,114,111,27,210,159,138,176,168,22,153,170,155,106,33,104,241,104,160,240,174,68,125,41,91,191,84,150,166,31,200,202,135,196,237,3,162,241,244,205,47,108,245,211,147,103,97,105,223,149,150,175,248,245,221,65,254,27,113,240,217,157,52,194,219,133,66,191,255,199,51,27,255,243,247,255,249,251,63,190,255,234,39,216,251,175,127,62,141,243,207,79,79,255,255,246,31,239,176,243,63,95,86,247,95,89,254,177,
110,243,47,99,243,242,235,155,79,47,207,62,253,199,237,223,111,33,184,189,250,207,255,131,217,143,222,100,250,93,238,127,251,230,167,152,127,31,230,159,159,238,255,61,204,250,199,59,253,69,140,127,250,242,255,197,124,127,153,219,111,183,37,163,95,56,197,255,245,207,167,33,159,183,58,163,207,28,171,111,191,219,143,176,236,185,199,143,167,230,55,31,124,151,67,47,67,253,247,99,200,243,116,251,69,252,248,106,2,253,229,220,248,106,190,252,55,103,198,251,43,41,127,56,73,190,177,135,111,217,243,237,152,127,204,165,47,198,253,98,242,188,255,230,95,239,171,194,87,102,6,31,212,133,247,246,143,94,82,41,215,174,159,118,243,227,105,97,79,24,63,119,251,193,138,76,245,220,226,91,79,254,117,57,252,25,129,103,176,95,58,124,250,247,168,169,138,79,155,79,127,91,158,92,250,240,239,55,65,0,62,253,173,107,220,178,173,221,102,145,157,117,90,62,111,141,61,186,213,245,116,95,240,215,89,15,221,77,240,30,69,249,105,136,239,101,54,60,141,181,244,187,255,255,76,131,
167,235,135,255,8,241,231,86,31,196,228,30,242,253,20,58,239,93,1,249,14,110,159,253,237,180,12,194,175,23,163,127,18,243,47,81,254,20,125,190,2,243,233,35,95,102,205,62,124,143,244,219,75,154,31,1,242,71,151,74,255,152,10,63,184,101,250,79,34,243,188,191,240,30,75,127,142,207,79,98,251,206,54,195,31,240,174,127,218,3,250,16,191,239,125,158,194,246,223,255,199,239,255,227,123,18,255,180,91,125,35,212,243,186,199,235,206,223,211,55,159,182,194,172,119,222,89,191,61,58,213,159,233,248,221,249,241,139,137,249,167,166,201,95,65,234,247,68,240,127,11,225,151,25,116,167,143,245,209,217,248,60,253,158,58,127,124,250,61,67,253,25,197,63,167,81,94,246,75,127,30,7,251,227,56,216,191,16,7,182,189,103,13,61,99,240,238,218,229,107,230,233,115,219,63,0,248,129,69,205,231,212,212,47,193,94,48,122,89,32,3,238,2,182,80,8,175,250,178,251,219,223,127,255,183,205,191,63,190,157,127,251,211,90,190,149,250,249,159,202,41,254,114,164,239,39,
20,135,221,195,249,196,75,211,207,215,143,223,52,93,113,187,124,252,105,79,245,190,114,24,78,183,187,179,195,54,13,194,219,85,200,139,35,107,189,217,97,91,252,153,15,37,23,63,163,96,255,50,98,216,255,251,137,241,156,85,150,135,81,119,203,108,120,34,138,253,11,136,2,254,58,170,128,255,101,100,105,210,56,249,69,116,161,191,158,57,63,206,65,255,114,110,124,47,251,252,6,227,47,16,244,135,118,96,190,20,245,63,134,222,254,147,208,127,88,50,31,199,2,252,8,26,224,175,193,227,3,162,244,88,30,249,19,84,84,181,24,150,47,29,213,251,163,135,87,53,190,28,234,15,146,197,111,77,254,249,233,222,240,37,34,142,150,191,223,59,9,112,123,126,203,22,111,158,6,95,12,105,217,61,106,101,232,175,208,251,122,9,224,107,48,62,209,95,33,241,2,16,125,3,232,11,8,62,78,97,252,150,24,254,21,137,159,158,253,4,141,239,29,255,128,200,247,54,255,252,244,212,244,133,204,126,245,254,65,174,219,243,183,100,190,167,177,127,156,206,207,72,126,77,232,111,
65,249,68,127,141,203,187,180,126,2,227,3,196,190,173,226,30,155,180,112,155,249,217,223,251,199,27,187,241,222,105,207,175,58,125,36,18,120,99,58,234,167,238,143,154,143,151,230,47,38,228,31,239,187,248,183,188,237,133,173,139,246,125,206,220,246,194,219,122,219,83,231,215,197,162,234,83,218,125,234,219,176,253,172,232,94,51,15,239,73,113,183,15,71,110,222,134,95,52,124,210,36,95,182,124,220,54,127,65,231,199,76,243,171,16,127,159,222,239,80,244,17,226,229,238,50,167,220,32,8,131,95,77,185,207,31,255,11,8,168,189,164,12,124,76,84,63,119,251,73,97,125,77,85,120,37,174,92,215,85,251,68,168,175,248,243,183,191,191,137,1,62,119,252,41,193,253,156,34,241,62,3,222,35,232,15,57,240,14,199,126,154,1,63,33,195,223,99,196,95,69,234,71,197,252,103,232,252,151,144,153,109,191,213,199,223,247,148,190,108,253,193,128,251,221,96,245,51,149,158,103,254,87,22,237,251,210,161,133,151,62,44,187,212,205,173,135,231,230,155,62,63,61,49,95,70,
120,60,14,121,237,241,19,83,242,115,239,155,136,220,188,206,219,70,195,243,118,207,221,159,172,154,167,246,81,149,231,213,120,219,211,249,188,60,243,129,18,1,111,169,249,193,137,246,93,170,254,106,186,61,137,250,67,83,236,191,128,110,104,158,255,25,210,45,221,255,98,234,221,168,240,76,178,27,1,254,107,104,70,191,51,115,127,124,70,251,209,57,251,152,194,185,163,244,95,45,56,95,19,225,3,20,248,30,150,255,187,231,198,3,190,254,18,232,62,168,153,111,229,1,126,82,31,255,116,21,130,180,123,45,204,240,178,11,122,11,218,191,47,45,11,241,54,159,29,245,127,124,209,241,181,98,65,216,221,55,78,31,95,52,126,218,81,253,99,195,251,220,240,87,79,129,23,4,238,7,16,66,119,129,109,193,203,45,31,198,224,198,186,143,43,190,167,78,127,65,105,137,239,48,245,141,230,251,11,184,168,134,69,53,132,47,249,14,239,50,242,85,212,223,182,125,148,151,183,30,63,96,225,125,227,254,249,184,241,130,89,247,41,168,150,167,183,179,169,65,152,135,93,248,118,43,
240,214,239,67,88,45,108,122,65,236,15,177,122,109,251,86,75,221,129,127,213,49,127,14,228,135,214,253,216,194,141,223,169,40,112,127,252,207,79,247,255,94,20,235,211,143,119,79,181,181,79,227,62,29,252,117,111,171,124,79,93,31,134,132,253,98,123,252,99,203,225,236,247,183,134,190,191,187,191,188,122,57,173,252,198,12,188,161,250,163,58,41,248,200,201,205,143,65,255,142,46,127,24,183,31,169,177,199,205,46,251,189,172,133,103,56,238,98,241,19,217,8,105,240,67,227,241,177,173,131,219,222,248,103,1,126,126,242,207,79,207,127,188,93,179,190,253,124,87,126,95,202,15,60,55,122,240,152,195,237,188,9,54,63,21,157,249,50,55,233,251,231,83,158,219,255,232,152,216,143,54,144,159,114,255,23,218,221,79,209,191,102,127,254,118,75,173,122,38,96,247,180,67,251,56,13,237,15,226,96,255,49,14,243,123,56,216,63,66,97,254,115,40,128,31,197,1,252,73,36,190,61,22,243,87,224,99,221,97,195,102,227,54,246,195,178,245,182,211,207,10,216,19,18,175,56,
253,26,1,251,25,108,236,7,177,121,159,75,246,143,176,249,19,188,209,220,197,112,183,98,216,185,81,154,191,86,40,242,19,183,249,253,127,125,39,143,225,179,223,254,69,223,247,55,59,222,62,186,15,250,140,229,189,199,247,114,28,128,27,188,75,179,191,129,135,219,75,0,248,251,230,147,185,104,213,106,108,95,114,32,110,223,254,82,213,221,172,244,226,194,221,91,125,42,158,129,122,147,161,121,255,226,7,138,25,164,229,173,50,203,47,60,123,126,27,238,135,82,252,131,19,90,79,251,22,191,255,219,59,73,157,159,37,250,109,178,252,55,213,22,95,202,154,60,21,186,120,227,65,63,173,95,254,254,111,155,127,124,170,202,124,126,51,222,245,165,50,205,107,4,249,178,8,73,94,250,37,122,124,90,32,93,48,187,151,222,248,219,163,41,75,247,58,15,211,47,37,238,211,112,255,5,196,125,169,224,247,151,17,215,157,62,78,220,103,134,252,66,209,253,163,34,64,255,199,200,238,163,210,249,107,9,248,60,222,255,13,242,249,16,1,169,37,0,49,210,112,124,120,45,249,125,
186,189,14,243,171,243,129,158,145,173,202,240,105,213,235,118,64,98,9,249,154,91,206,220,147,133,125,89,10,8,22,232,202,127,255,164,223,45,240,171,217,237,146,155,41,190,247,124,105,120,163,246,98,146,154,37,70,124,89,113,120,187,170,246,146,145,215,141,213,115,189,168,215,253,156,242,147,239,182,247,78,94,26,223,59,221,151,48,110,252,124,226,65,249,116,76,242,254,118,49,107,105,254,143,39,0,170,250,126,146,195,95,98,83,215,247,151,192,185,113,111,5,237,22,99,88,198,11,118,111,109,99,19,70,77,216,38,143,123,56,111,56,248,227,197,201,55,60,250,222,234,211,107,147,251,233,20,239,70,134,5,195,143,196,244,247,244,197,247,32,121,19,181,221,219,188,31,12,125,174,231,243,188,166,144,87,110,240,129,18,171,108,75,22,245,237,184,198,15,87,232,238,109,126,152,59,212,60,101,0,149,213,71,203,84,75,213,49,175,186,71,170,217,62,45,176,61,181,255,12,139,246,180,160,245,116,176,231,182,98,246,178,164,251,12,199,39,166,26,111,217,74,207,58,163,185,
203,212,7,11,176,106,157,235,223,235,118,127,104,37,240,169,211,247,231,247,243,251,71,231,248,115,243,183,235,129,95,173,128,39,110,247,245,70,200,115,175,7,241,148,42,209,109,178,143,240,226,214,254,15,120,177,208,60,251,92,95,238,75,126,60,67,250,14,75,30,88,131,95,102,127,246,188,186,252,90,170,224,139,212,166,135,25,117,27,232,35,11,59,95,88,176,69,95,249,89,25,182,237,211,153,212,119,147,142,94,178,159,150,191,223,51,113,95,238,149,62,63,252,60,238,91,251,247,52,200,195,114,251,68,162,95,77,157,63,131,255,77,220,165,62,207,191,119,162,227,158,76,248,235,72,112,219,99,122,71,80,254,231,87,196,248,159,63,88,1,126,29,226,103,68,228,57,243,237,17,34,125,78,146,123,35,38,244,175,18,147,251,148,250,237,183,255,31,191,192,127,184,
20,135,221,195,249,196,75,211,207,215,143,223,52,93,113,187,124,252,105,79,245,190,114,24,78,183,187,179,195,54,13,194,219,85,200,139,35,107,189,217,97,91,252,153,15,37,23,63,163,96,255,50,98,216,255,251,137,241,156,85,150,135,81,119,203,108,120,34,138,253,11,136,2,254,58,170,128,255,101,100,105,210,56,249,69,116,161,191,158,57,63,206,65,255,114,110,124,47,251,252,6,227,47,16,244,135,118,96,190,20,245,63,134,222,254,147,208,127,88,50,31,199,2,252,8,26,224,175,193,227,3,162,244,88,30,249,19,84,84,181,24,150,47,29,213,251,163,135,87,53,190,28,234,15,146,197,111,77,254,249,233,222,240,37,34,142,150,191,223,59,9,112,123,126,203,22,111,158,6,95,12,105,217,61,106,101,232,175,208,251,122,9,224,107,48,62,209,95,33,241,2,16,125,3,232,11,8,62,78,97,252,150,24,254,21,137,159,158,253,4,141,239,29,255,128,200,247,54,255,252,244,212,244,133,204,126,245,254,65,174,219,243,183,100,190,167,177,127,152,204,207,56,126,77,231,111,
33,249,68,127,141,202,187,164,190,67,241,1,82,223,214,112,143,77,90,184,205,252,236,237,253,227,141,213,120,239,172,231,87,157,62,18,7,188,49,28,245,83,247,71,141,199,75,243,23,3,242,143,247,29,252,91,214,246,194,212,69,247,62,231,109,123,225,109,181,237,169,243,235,82,81,245,41,237,62,245,109,216,126,86,115,175,121,135,247,148,184,219,135,35,55,111,195,47,26,62,233,145,47,91,62,110,153,191,160,243,99,134,249,85,132,191,79,239,119,40,250,8,241,114,119,153,81,110,16,132,193,175,166,220,231,143,255,5,4,212,94,18,6,62,38,170,159,187,253,164,176,190,38,42,188,18,87,174,235,170,125,34,212,87,252,249,219,223,223,68,0,159,59,254,148,224,126,78,144,120,159,1,239,17,244,135,28,120,135,99,63,205,128,159,144,225,239,49,226,175,34,245,163,98,254,51,116,254,75,200,204,182,223,234,227,239,251,73,95,182,254,96,184,253,110,168,250,153,74,207,51,255,43,191,225,251,210,161,133,151,62,44,187,212,205,173,135,231,230,155,62,63,61,49,95,70,
120,60,10,121,237,241,19,83,242,115,239,155,136,220,124,206,219,54,195,243,102,207,221,155,172,154,167,246,81,149,231,213,120,219,209,249,188,56,243,129,2,1,111,169,249,193,137,246,93,170,254,106,186,61,137,250,67,83,236,191,128,110,104,158,255,25,210,45,221,255,98,234,221,168,240,76,178,27,1,254,107,104,70,191,51,115,127,124,66,251,209,57,251,152,194,185,163,244,95,45,56,95,19,225,3,20,248,30,150,255,187,231,198,3,190,254,18,230,62,168,153,111,197,1,126,82,31,255,116,13,130,180,123,45,203,240,178,7,122,11,217,191,47,45,11,241,54,159,29,245,127,124,209,241,181,94,65,216,221,183,77,31,95,50,126,218,79,253,99,195,251,220,240,87,79,129,23,4,238,199,15,66,119,129,109,193,203,45,31,198,224,198,186,143,43,190,167,78,127,65,97,137,239,48,245,141,230,251,11,184,168,134,69,53,132,47,217,14,239,50,242,85,212,223,182,125,148,151,183,30,63,96,225,125,219,254,249,176,241,130,89,247,41,168,150,167,183,147,169,65,152,135,93,248,118,35,
240,214,239,67,88,45,108,122,65,236,15,177,122,109,251,86,75,221,129,127,213,49,127,14,228,135,86,253,216,194,141,223,169,39,112,127,252,207,79,247,255,94,20,235,211,143,119,207,180,181,79,227,62,29,251,117,111,107,124,79,93,31,134,132,253,98,115,252,99,139,225,236,247,55,134,190,191,183,191,188,122,57,171,252,198,12,188,161,250,163,58,41,248,200,185,205,143,65,255,142,46,127,24,183,31,169,177,199,205,46,251,189,156,133,103,56,238,98,241,19,185,8,105,240,67,227,241,177,141,131,219,206,248,103,1,126,126,242,207,79,207,127,188,93,177,190,253,124,87,126,95,138,15,60,55,122,240,144,195,237,180,9,54,63,149,156,249,50,51,233,251,167,83,158,219,255,232,144,216,143,182,143,159,50,255,23,218,221,207,208,191,230,126,254,118,75,172,122,38,96,247,180,63,251,56,13,237,15,226,96,255,49,14,243,123,56,216,63,66,97,254,115,40,128,31,197,1,252,73,36,190,61,20,243,87,224,99,221,97,195,102,227,54,246,195,178,245,182,211,207,10,216,19,18,175,56,
253,26,1,251,25,108,236,7,177,121,159,75,246,143,176,249,19,188,209,220,197,112,183,98,216,185,81,154,191,214,39,242,19,183,249,253,127,125,39,139,225,179,223,254,69,223,247,183,58,222,62,186,15,250,140,229,189,199,247,50,28,128,27,188,75,179,191,129,135,219,75,0,248,251,230,147,185,104,213,106,108,95,50,32,110,223,254,82,213,221,172,244,226,194,221,91,125,42,158,129,122,147,159,121,255,226,7,74,25,164,229,173,46,203,47,60,121,126,27,238,135,82,252,131,243,89,79,251,22,191,255,219,59,41,157,159,37,250,109,170,252,55,181,22,95,138,154,60,149,185,120,227,65,63,173,95,254,254,111,155,127,124,170,202,124,126,51,222,245,165,46,205,107,4,249,178,8,73,94,250,37,122,124,90,32,93,48,187,23,222,248,219,163,9,75,247,42,15,211,47,37,238,211,112,255,5,196,125,169,223,247,151,17,215,157,62,78,220,103,134,252,66,209,253,163,18,64,255,199,200,238,163,210,249,107,9,248,60,222,255,13,242,249,16,1,169,37,0,49,210,112,124,120,45,249,125,
186,189,14,243,171,179,129,158,145,173,202,240,105,213,235,118,60,98,9,249,154,91,198,220,147,133,125,89,10,8,22,232,202,127,255,164,223,45,240,171,217,237,146,155,41,190,247,124,105,120,163,246,98,146,154,37,70,124,89,113,120,187,170,246,146,143,215,141,213,115,181,168,215,253,156,242,147,239,182,247,78,94,26,223,59,221,151,48,110,252,124,226,65,249,116,72,242,254,118,49,107,105,254,143,39,0,170,250,126,142,195,95,98,83,215,247,151,192,185,113,111,229,236,22,99,88,198,11,118,111,109,99,19,70,77,216,38,143,123,56,111,56,248,227,197,201,55,60,250,222,234,211,107,147,251,217,20,239,70,134,5,195,143,196,244,247,228,197,247,32,121,19,181,221,219,188,31,12,125,174,230,243,188,166,144,87,110,240,129,2,171,108,75,22,245,237,176,198,15,87,232,238,109,126,152,57,212,60,229,255,148,213,71,139,84,75,213,49,175,186,71,106,217,62,45,176,61,181,255,12,139,246,180,160,245,116,172,231,182,98,246,178,164,251,12,199,39,166,26,111,185,74,207,58,163,185,
203,212,7,203,175,106,157,235,223,171,118,127,104,37,240,169,211,247,231,247,243,251,71,231,248,115,243,183,235,129,95,173,128,39,110,247,245,70,200,115,175,7,241,148,42,209,109,178,143,240,226,214,254,15,120,177,208,60,251,92,93,238,75,126,60,67,250,14,75,30,88,131,95,102,127,246,188,186,252,90,168,224,139,196,166,135,25,117,27,232,35,11,59,95,88,176,69,95,249,89,25,182,237,211,137,212,119,115,142,94,114,159,150,191,223,51,113,95,238,149,62,63,252,60,238,91,251,247,52,200,195,114,251,68,162,95,77,157,63,131,255,77,220,165,62,207,191,119,158,227,158,74,248,235,72,112,219,99,122,71,80,254,231,87,196,248,159,63,88,1,126,29,226,103,68,228,57,239,237,17,34,125,78,145,123,35,38,244,175,18,147,251,148,250,237,183,255,31,221,208,127,92,