Commit 1a2019eb authored by Thomas Krex's avatar Thomas Krex

-suchmarkierung für thumbails: anstatt die thumbails hochzuskalieren

werden die markierungen (RectF) runterskaliert
parent 95f9085e
# cache for current jar dependency. DO NOT EDIT.
# format is <lastModified> <length> <SHA-1> <path>
# Encoding is UTF-8
......@@ -10,6 +10,7 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Build;
import android.view.View;
import android.widget.ImageButton;
......@@ -183,14 +184,16 @@ public class IndexEntry extends ImageButton {
else
p.setStyle(Paint.Style.STROKE);
Bitmap upScaled = Bitmap.createScaledBitmap(thumbnail,
thumbnail.getWidth() * 5, thumbnail.getHeight() * 5,
true);
Canvas searchCanvas = new Canvas(upScaled);
RectF scaledRect = new RectF(shape.rectangle.left / 5,
shape.rectangle.top / 5, shape.rectangle.right / 5,
shape.rectangle.bottom / 5);
// Bitmap upScaled = Bitmap.createScaledBitmap(thumbnail,
// thumbnail.getWidth() * 5, thumbnail.getHeight() * 5,
// true);
Canvas searchCanvas = new Canvas(thumbnail);
searchCanvas.drawRect(shape.rectangle, p);
setThumbnail(Bitmap.createScaledBitmap(upScaled,
thumbnail.getWidth(), thumbnail.getHeight(), true));
searchCanvas.drawRect(scaledRect, p);
setThumbnail(thumbnail);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment