Update OsmAnd/jni/osmand/textdraw.cpp
This commit is contained in:
parent
fab71df9e2
commit
03c1148c8c
1 changed files with 6 additions and 3 deletions
|
@ -147,14 +147,13 @@ void drawTextOnCanvas(SkCanvas* cv, std::string text, float centerX, float cente
|
||||||
paintText.setStyle(SkPaint::kStroke_Style);
|
paintText.setStyle(SkPaint::kStroke_Style);
|
||||||
paintText.setColor(-1); // white
|
paintText.setColor(-1); // white
|
||||||
paintText.setStrokeWidth(2 + textShadow);
|
paintText.setStrokeWidth(2 + textShadow);
|
||||||
// FIXME test black areas...
|
cv->drawText(text.c_str(), text.length(), centerX, centerY, paintText);
|
||||||
// cv->drawText(text.c_str(), text.length(), centerX, centerY, paintText);
|
|
||||||
// reset
|
// reset
|
||||||
paintText.setStrokeWidth(2);
|
paintText.setStrokeWidth(2);
|
||||||
paintText.setStyle(SkPaint::kFill_Style);
|
paintText.setStyle(SkPaint::kFill_Style);
|
||||||
paintText.setColor(c);
|
paintText.setColor(c);
|
||||||
}
|
}
|
||||||
// cv->drawText(text.data(), text.length(), centerX, centerY, paintText);
|
cv->drawText(text.data(), text.length(), centerX, centerY, paintText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -468,6 +467,10 @@ bool textOrder(TextDrawInfo* text1, TextDrawInfo* text2) {
|
||||||
|
|
||||||
SkTypeface* serif = SkTypeface::CreateFromName("Droid Serif", SkTypeface::kNormal);
|
SkTypeface* serif = SkTypeface::CreateFromName("Droid Serif", SkTypeface::kNormal);
|
||||||
void drawTextOverCanvas(RenderingContext* rc, SkCanvas* cv) {
|
void drawTextOverCanvas(RenderingContext* rc, SkCanvas* cv) {
|
||||||
|
if(true) {
|
||||||
|
// FIXME comment out (after testing)
|
||||||
|
return;
|
||||||
|
}
|
||||||
SkRect r = SkRect::MakeLTRB(0, 0, rc->width, rc->height);
|
SkRect r = SkRect::MakeLTRB(0, 0, rc->width, rc->height);
|
||||||
r.inset(-100, -100);
|
r.inset(-100, -100);
|
||||||
quad_tree<TextDrawInfo*> boundsIntersect(r, 4, 0.6);
|
quad_tree<TextDrawInfo*> boundsIntersect(r, 4, 0.6);
|
||||||
|
|
Loading…
Reference in a new issue