Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text与tspan的rotate属性效果不正确 #294

Open
cmdssd opened this issue Sep 6, 2024 · 0 comments
Open

text与tspan的rotate属性效果不正确 #294

cmdssd opened this issue Sep 6, 2024 · 0 comments

Comments

@cmdssd
Copy link
Contributor

cmdssd commented Sep 6, 2024

描述 / Description

text与tspan的rotate属性效果为整个字符串整体旋转,而不是单个字符旋转

demo

import { TSpan } from '@react-native-oh-tpl/react-native-svg';
import React from 'react';
import { StyleSheet,SafeAreaView } from 'react-native';
import { Svg,Text as SVGText } from 'react-native-svg';

export default function App() {
  return (
    <SafeAreaView style={styles.container}>
      <Svg width={100} height={100} >
        <SVGText x={10} y={20} >
          <TSpan y="20" x="10" rotate={45}>测试文本 旋转</TSpan>
        </SVGText>
      </Svg>
      <Svg width={100} height={100} >
        <SVGText x={10} y={20} >
          <TSpan y="20" x="10" rotate={60}>测试文本 旋转</TSpan>
        </SVGText>
      </Svg>
      <Svg width={100} height={100} >
        <SVGText x={10} y={20} >
          <TSpan y="20" x="10" rotate={-45}>测试文本 旋转</TSpan>
        </SVGText>
      </Svg>
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex:1,
    backgroundColor: 'grey',
  },
});

复现步骤 / Steps to reproduce

No response

库版本 / Library version

15.0.0-0.5.7

React Native OpenHarmony version

0.72.5

构建类型 / Build type

None

设备 / Device

None

设备版本 / Device model

No response

已悉知 / Acknowledgements

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant