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

-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; ...@@ -10,6 +10,7 @@ import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Build; import android.os.Build;
import android.view.View; import android.view.View;
import android.widget.ImageButton; import android.widget.ImageButton;
...@@ -183,14 +184,16 @@ public class IndexEntry extends ImageButton { ...@@ -183,14 +184,16 @@ public class IndexEntry extends ImageButton {
else else
p.setStyle(Paint.Style.STROKE); p.setStyle(Paint.Style.STROKE);
Bitmap upScaled = Bitmap.createScaledBitmap(thumbnail, RectF scaledRect = new RectF(shape.rectangle.left / 5,
thumbnail.getWidth() * 5, thumbnail.getHeight() * 5, shape.rectangle.top / 5, shape.rectangle.right / 5,
true); shape.rectangle.bottom / 5);
Canvas searchCanvas = new Canvas(upScaled); // Bitmap upScaled = Bitmap.createScaledBitmap(thumbnail,
// thumbnail.getWidth() * 5, thumbnail.getHeight() * 5,
// true);
Canvas searchCanvas = new Canvas(thumbnail);
searchCanvas.drawRect(shape.rectangle, p); searchCanvas.drawRect(scaledRect, p);
setThumbnail(Bitmap.createScaledBitmap(upScaled, setThumbnail(thumbnail);
thumbnail.getWidth(), thumbnail.getHeight(), true));
} }
......
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