mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 07:07:38 +03:00
Fixed name of cropped cover bmp, clarified comment.
This commit is contained in:
parent
757753df72
commit
b9cb412c1c
@ -349,7 +349,7 @@ const std::string& Epub::getAuthor() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string Epub::getCoverBmpPath(bool cropped) const {
|
std::string Epub::getCoverBmpPath(bool cropped) const {
|
||||||
const auto coverFileName = "cover" + cropped ? "_crop" : "";
|
const auto coverFileName = std::string("cover") + (cropped ? "_crop" : "");
|
||||||
return cachePath + "/" + coverFileName + ".bmp";
|
return cachePath + "/" + coverFileName + ".bmp";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -232,9 +232,10 @@ void GfxRenderer::drawBitmap(const Bitmap& bitmap, const int x, const int y, con
|
|||||||
drawVal(screenX, screenY, val);
|
drawVal(screenX, screenY, val);
|
||||||
|
|
||||||
// draw extended pixels
|
// draw extended pixels
|
||||||
/// amount of pixels taken from bitmap and repeated to extend
|
// amount of pixels taken from bitmap and repeated to extend.
|
||||||
|
// Trade-off between risk of repeating "edgy" content like text and more quality
|
||||||
int extendY = 20;
|
int extendY = 20;
|
||||||
int extendX = 20; // The width of the strip to be mirrored
|
int extendX = 20;
|
||||||
int drawExtY = 0;
|
int drawExtY = 0;
|
||||||
if (extend) {
|
if (extend) {
|
||||||
int imgHeight = std::floor(scale * (bitmap.getHeight() - cropPixY));
|
int imgHeight = std::floor(scale * (bitmap.getHeight() - cropPixY));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user