PartText

정확히 하나의 텍스트 레이아웃 요소를 포함하는 시계 화면의 일부를 나타냅니다.

Wear OS 4에서 도입되었습니다.

문법

<PartText x="integer" y="integer" width="integer" height="integer"
           pivotX="float" pivotY="float" angle="float-degrees" alpha="integer"
           name="string" scaleX="float" scaleY="float"
           renderMode="[SOURCE | MASK | ALL]"
           tintColor="argb-color | rgb-color">
    <!-- Text-specific child elements. -->
    <Text>
        <!-- There must be raw text as the leaf inner element within a
            "PartText" element tree. -->
        <Font family="font" size="20" color="#00FFFF">Hello world
        </Font>
        <Font>
            <!-- Example of a text decoration element. -->
            <Outline>
                <!-- Example of a template with 2 string values. -->
                <Template>%s %s
                    <Parameter expression="[MONTH_S]" />
                    <Parameter expression="[DAY]" />
                </Template>
            </Outline>
            <!-- Example of a text formatting element. -->
            <Upper>
                <Template ... />
            </Upper>
            <Template ... />
        </Font>
    </Text>
    <!-- A "PartText" element can contain this "TextCircular" element instead
         of a "Text" element.
    <TextCircular centerX="180" centerY="180" direction="COUNTER_CLOCKWISE"
                  endAngle="90" height="340" width="340" startAngle="270">
        There must be raw text as the leaf inner element within a "PartText"
        element tree.
        <Font family="font" size="20" color="#00FFFF">Hello world
        </Font>
        <Font>
            Example of a text decoration element.
            <Outline>
                Example of a template with 2 string values.
                <Template>%s %s
                    <Parameter expression="[MONTH_S]" />
                    <Parameter expression="[DAY]" />
                </Template>
            </Outline>
            Example of a text formatting element.
            <Upper>
                <Template ... />
            </Upper>
            <Template ... />
        </Font>
    </TextCircular />
    -->

    <!-- Child elements that are shared across all "Part" elements. -->
    <Localization .../>
    <Transform .../>
    <Variant .../>
    <Gyro .../>
    <Launch .../>
    <ScreenReader .../>
</PartText>

속성

PartText 요소는 다음과 같은 속성을 포함합니다.

x, y, width, height
요소의 크기와 위치를 지정하는 정수 모음입니다.
pivotY pivotX
2차원 피벗 지점으로, 이 지점을 중심으로 요소가 회전합니다. 두 값 모두 $ [0, 1] $ 범위에 들어맞게 조정되는 부동 소수점 수입니다.
angle
요소가 피벗 지점을 중심으로 시계 방향으로 회전할 각도입니다.
alpha
이 요소에 필요한 투명도 수준을 설정합니다. 값 0은 요소가 완전히 투명해야 함을 나타냅니다. 값 255는 요소가 완전히 불투명해야 함을 나타냅니다.
name
이 요소를 식별하는 문자열입니다. 시계 화면 파일 내의 다른 위치에서 이 요소를 참조해야 하는 경우 유용합니다.
scaleX
이 요소에 적용할 가로 배율입니다.
scaleY
이 요소에 적용할 세로 배율입니다.
renderMode
요소의 렌더링 모드 유형입니다. 이 요소의 기본값은 SOURCE입니다.
tintColor
요소에 색조 색상 필터를 적용합니다. ARGB 형식(#ff000000 = 불투명한 검은색) 또는 RGB 형식(#000000 = 검은색)을 사용하여 색상을 지정해야 합니다.

내부 요소

PartText 요소는 다음과 같은 내부 요소를 포함할 수 있습니다. Text 또는 TextCircular가 내부 요소 중 하나여야 하는 점을 제외하고 모든 요소는 선택사항입니다. PartText 요소는 각 내부 요소를 무제한으로 포함할 수 있습니다. 단, Text, TextCircular, Localization, Gyro, Launch, ScreenReader는 예외입니다(각각 최대 1번 표시될 수 있음).

  • 참고: JavaScript가 사용 중지되어 있으면 링크 텍스트가 표시됩니다.
  • 그룹
  • PartImage
  • PartDraw