mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
convert to CRLF line endings
This commit is contained in:
+8
-8
@@ -126,23 +126,23 @@ public:
|
||||
inline RealPoint getPos() const { return RealPoint(left, top); }
|
||||
inline RealSize getSize() const { return RealSize(width, height); }
|
||||
inline RealRect getExternalRect() const { return RealRect(left, top, width, height); }
|
||||
inline std::string getExternalRectString(double scale, Radians angle, double bleed, int img_width, int img_height, int img_offset) { ///< update the style before calling this
|
||||
inline std::string getExternalRectString(double scale, Radians angle, double bleed, int img_width, int img_height, int img_offset) { ///< update the style before calling this
|
||||
double x = left * scale, y = top * scale;
|
||||
double w = width * scale, h = height * scale;
|
||||
RealRect rect(x, y, w, h);
|
||||
int degrees = 0;
|
||||
RealRect rect(x, y, w, h);
|
||||
int degrees = 0;
|
||||
if (is_rad0(angle)) {
|
||||
} else if (is_rad180(angle)) {
|
||||
rect = RealRect(img_width - x - w, img_height - y - h, w, h);
|
||||
rect = RealRect(img_width - x - w, img_height - y - h, w, h);
|
||||
degrees = 180;
|
||||
} else if (is_rad90(angle)) {
|
||||
rect = RealRect(y, img_height - x - w, h, w);
|
||||
rect = RealRect(y, img_height - x - w, h, w);
|
||||
degrees = 90;
|
||||
} else if (is_rad270(angle)) {
|
||||
rect = RealRect(img_width - y - h, x, h, w);
|
||||
rect = RealRect(img_width - y - h, x, h, w);
|
||||
degrees = 270;
|
||||
} else {
|
||||
return "";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return "<mse-crop-data>" + std::to_string((int)std::ceil (rect.x + bleed + img_offset)) +
|
||||
"-" + std::to_string((int)std::ceil (rect.y + bleed)) +
|
||||
|
||||
Reference in New Issue
Block a user