fix(android): defineMarker/getDefinedMarker storage

This commit is contained in:
Mikael Sand
2019-10-05 12:30:37 +03:00
parent 5c5072dbef
commit e6eda84513
3 changed files with 6 additions and 6 deletions
@@ -415,10 +415,10 @@ public class SvgView extends ReactViewGroup implements ReactCompoundView, ReactC
}
void defineMarker(VirtualView marker, String markerRef) {
mDefinedMasks.put(markerRef, marker);
mDefinedMarkers.put(markerRef, marker);
}
VirtualView getDefinedMarker(String markerRef) {
return mDefinedMasks.get(markerRef);
return mDefinedMarkers.get(markerRef);
}
}
@@ -121,7 +121,7 @@ class TSpanView extends TextView {
FontData font = gc.getFont();
TextPaint tp = new TextPaint(paint);
applyTextPropertiesToPaint(tp, font);
applySpacingAndFeatuers(tp, font);
applySpacingAndFeatures(tp, font);
double fontSize = gc.getFontSize();
Layout.Alignment align;
@@ -225,7 +225,7 @@ class TSpanView extends TextView {
FontData font = gc.getFont();
applyTextPropertiesToPaint(paint, font);
applySpacingAndFeatuers(paint, font);
applySpacingAndFeatures(paint, font);
cachedAdvance = paint.measureText(line);
return cachedAdvance;
@@ -237,7 +237,7 @@ class TSpanView extends TextView {
final static String additionalLigatures = "'hlig', 'cala', ";
final static String fontWeightTag = "'wght' ";
private void applySpacingAndFeatuers(Paint paint, FontData font) {
private void applySpacingAndFeatures(Paint paint, FontData font) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
double letterSpacing = font.letterSpacing;
paint.setLetterSpacing((float) (letterSpacing / (font.fontSize * mScale)));
@@ -92,6 +92,7 @@ abstract public class VirtualView extends ReactViewGroup {
Path mFillPath;
Path mStrokePath;
Path mMarkerPath;
Path mClipRegionPath;
RectF mBox;
RectF mFillBounds;
RectF mStrokeBounds;
@@ -101,7 +102,6 @@ abstract public class VirtualView extends ReactViewGroup {
Region mMarkerRegion;
Region mStrokeRegion;
Region mClipRegion;
Path mClipRegionPath;
ArrayList<PathElement> elements;
@Override