mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-08-16 02:44:58 +00:00
fix(android): defineMarker/getDefinedMarker storage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user