+++ /dev/null
-\r
-<dial title="satellite" description="卫星" size="466 466" version="2.0" preview_img="./instance/111/satellite.png" ambient_period="60">\r
-\r
- <video id="video" rect="0 0 466 466" source="./instance/111/satellite.mp4" color_key="0xff212324" preview_frame="./instance/111/preview_satellite.png"></video>\r
-\r
- <!-- 月份标签 -->\r
- <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>\r
- <!-- 日期标签 -->\r
- <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>\r
- <!-- 星期显示 -->\r
- <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
-\r
- <!-- 电池进度条 -->\r
- <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
- <!-- 电池图像 -->\r
- <option_img position="173 52" img_names="./instance/111/Battery/Battery.png,./instance/111/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
- <!-- 电池百分比标签 -->\r
- <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
-\r
-\r
- <!-- 小时标签 -->\r
- <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->\r
- <!-- 分钟标签 -->\r
- <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->\r
- <!-- 分隔符 -->\r
- <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->\r
-\r
- <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10" display_mode="always" ambient_periodic="true"></label>\r
-\r
-</dial>
\ No newline at end of file
+++ /dev/null
-<dial title="birdie" description="飞鸟" size="466 466" version="2.0" preview_img="./instance/112/birdie.png" ambient_period="60">\r
-\r
- <video id="video" rect="0 0 466 466" source="./instance/112/birdie.mp4" color_key="0xff212324" preview_frame="./instance/112/preview_birdie.png"></video>\r
-\r
- <!-- 月份标签 -->\r
- <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>\r
- <!-- 日期标签 -->\r
- <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>\r
- <!-- 星期显示 -->\r
- <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
-\r
- <!-- 电池进度条 -->\r
- <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
- <!-- 电池图像 -->\r
- <option_img position="173 52" img_names="./instance/112/Battery/Battery.png,./instance/112/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
- <!-- 电池百分比标签 -->\r
- <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
-\r
-\r
- <!-- 小时标签 -->\r
- <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->\r
- <!-- 分钟标签 -->\r
- <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->\r
- <!-- 分隔符 -->\r
- <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->\r
-\r
- <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10" display_mode="always" ambient_periodic="true"></label>\r
-\r
-</dial>
\ No newline at end of file
+++ /dev/null
-<dial title="dawninsight" description="晨曦智影" size="466 466" version="2.0" preview_img="./instance/113/dawninsight.png" ambient_period="60">\r
- <!-- 背景 -->\r
- <static_img id="back_ground" position="0 0" img_name="./instance/113/MAIN_FACE_IMAGE.png"></static_img>\r
-\r
- <!-- 天气显示 -->\r
- <option_img position="165 50" img_names="./instance/113/weather/SUNNY.png,./instance/113/weather/CLEAR_SUNNY.png,./instance/113/weather/SUNNY_CLOUDY.png,./instance/113/weather/CLEAR_CLOUDY.png,./instance/113/weather/OVERCAST.png,./instance/113/weather/RAIN.png,./instance/113/weather/THUNDERSHOWER.png,./instance/113/weather/SNOW.png,./instance/113/weather/FOGGY.png,./instance/113/weather/HAZE.png,./instance/113/weather/DUSTSTORM.png,./instance/113/weather/UNKNOWN.png" bind_data="24" ></option_img>\r
- <!-- 天气信息显示 -->\r
- <label id="weather_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="165 70 200 60" text="%s" font_size="30" align="center" bind_data="20482" ></label>\r
- \r
- <!-- 日期显示 -->\r
- <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="43 128 380 60" text="%s" font_size="30" align="center" bind_data="20484" period="10"></label>\r
- \r
- <!-- 步数 -->\r
- <label id="step_label" color="0xFFaaaaaa" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 413 200 60" text="步数" font_size="20" align="center"></label>\r
- <!-- 目标步数完成度 -->\r
- <label id="step_label_goal" color="0xFF666666" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 325 200 60" text="目标步数完成度" font_size="16" align="center"></label>\r
-\r
- <!-- 心率显示 -->\r
- <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="30 353 200 60" text="%0.f" font_size="30" align="center" bind_data="2"></label> \r
- <!-- 步数显示 -->\r
- <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 376 200 60" text="%0.f" font_size="30" align="center" bind_data="1" period="10"></label>\r
- <!-- 卡路里显示 -->\r
- <label id="calories_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="240 353 200 60" text="%0.f" font_size="30" align="center" bind_data="3" period="10"></label>\r
- \r
- <!-- 小时显示 -->\r
- <label id="hour_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="86 162 200 60" text="%02.f" font_size="120" align="center" bind_data="15" period="10" display_mode="always" ambient_periodic="true"></label>\r
- <!-- 分钟显示 -->\r
- <label id="minute_label" color="0xFF666666" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="240 162 200 60" text="%02.f" font_size="120" align="center" bind_data="14" period="10" display_mode="always" ambient_periodic="true"></label>\r
-\r
- <!-- 电量 -->\r
- <arc_progress id="battery_progress" rect="0 0 466 436" color="0xFFf0c440" cap_type="round" radius="191" background_color="0xff191919" start_angle="290" end_angle="430" line_width="10" bind_data="33" period="10" ></arc_progress>\r
- <!-- 步数目标 -->\r
- <box_progress id="stepgoal_progress" rect="103 302 260 12" color="0xFFf0c440" cap_type="round" direction="left_to_right" background_color="0xff191919" bind_data="31" period="10"></box_progress>\r
-\r
- <!-- 支付宝 -->\r
- <click rect="20 208 80 80" action_slice="204"></click>\r
- <!--AI-->\r
- <click rect="393 208 80 80" action_slice="203"></click>\r
-</dial>\r
+++ /dev/null
-<dial title="obsidianrhythm" description="黑曜律动" size="466 466" version="2.0" preview_img="./instance/114/obsidianrhythm.png" ambient_period="60">\r
-<!-- 视频背景 -->\r
-<video id="video" rect="0 0 466 466" source="./instance/114/obsidianrhythm.mp4" color_key="0xff212324" preview_frame="./instance/114/preview_obsidianrhythm.png"/>\r
-<!-- 动态背景 \r
- <sequence_img img_names="./instance/114/background/1.png,./instance/114/background/2.png,./instance/114/background/3.png,./instance/114/background/4.png,./instance/114/background/5.png,./instance/114/background/6.png,./instance/114/background/7.png,./instance/114/background/8.png,./instance/114/background/9.png,./instance/114/background/10.png,./instance/114/background/11.png,./instance/114/background/12.png,./instance/114/background/13.png,./instance/114/background/14.png,./instance/114/background/15.png,./instance/114/background/16.png,./instance/114/background/17.png,./instance/114/background/18.png,./instance/114/background/19.png,./instance/114/background/20.png,./instance/114/background/21.png" position="0 0" repeat="true" interval="100"></sequence_img>\r
- -->\r
-<!-- 背景 -->\r
-<static_img id="back_ground" position="0 0" img_name="./instance/114/MAIN_FACE_IMAGE.png"/>\r
-<!-- 天气显示 -->\r
-<option_img position="201 69" img_names="./instance/114/weather/SUNNY.png,./instance/114/weather/CLEAR_SUNNY.png,./instance/114/weather/SUNNY_CLOUDY.png,./instance/114/weather/CLEAR_CLOUDY.png,./instance/114/weather/OVERCAST.png,./instance/114/weather/RAIN.png,./instance/114/weather/THUNDERSHOWER.png,./instance/114/weather/SNOW.png,./instance/114/weather/FOGGY.png,./instance/114/weather/HAZE.png,./instance/114/weather/DUSTSTORM.png,./instance/114/weather/UNKNOWN.png" bind_data="24"/>\r
-<!-- 星期显示 -->\r
-<option_img position="75 173" img_names="./instance/114/week/WEEK_SUN.png,./instance/114/week/WEEK_MON.png,./instance/114/week/WEEK_TUE.png,./instance/114/week/WEEK_WED.png,./instance/114/week/WEEK_THU.png,./instance/114/week/WEEK_FRI.png,./instance/114/week/WEEK_SAT.png" bind_data="17" period="10"/>\r
-<!-- 天气信息显示 -->\r
-<label id="weather_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="83 130 300 30" text="%s" font_size="20" align="center" bind_data="20482"/>\r
-<!-- 日期显示 -->\r
-<label id="day_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="90 222 100 40" text="%0.f" font_size="24" align="center" bind_data="16" period="10"/>\r
-<!-- 心率显示 -->\r
-<label id="heart_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="132 348 49 25" text="%0.f" font_size="20" align="center" bind_data="2"/>\r
-<!-- 步数显示 -->\r
-<label id="step_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="83 374 300 25" text="%0.f" font_size="20" align="center" bind_data="1" period="10"/>\r
-<!-- 卡路里显示 -->\r
-<label id="calories_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="287 348 45 25" text="%0.f" font_size="20" align="center" bind_data="3" period="10"/>\r
-<!-- 心率icon显示 -->\r
-<static_img position="144 315" img_name="./instance/114/module/heartrate.png"/>\r
-<!-- 步数icon显示 -->\r
-<static_img position="220 341" img_name="./instance/114/module/step.png"/>\r
-<!-- 卡路里icon显示 -->\r
-<static_img position="296 315" img_name="./instance/114/module/calories.png"/>\r
-<!-- 时间背景框icon显示 -->\r
-<static_img position="300 213" img_name="./instance/114/module/ellipse.png"/>\r
-<label id="hour_ten_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="300 222 100 33" text="%s" font_size="20" align="center" bind_data="20483" period="10"/><!-- 小时 -->\r
-<rotate_img id="hour" position="212 75" rotate_center="21.0 158.0" rotate_start="0" rotate_end="360" img_name="./instance/114/HOURHAND.png" bind_data="9" period="10" display_mode="always" ambient_periodic="true"/>\r
-<!-- 分钟 -->\r
-<rotate_img id="minute" position="218 23" rotate_center="15.0 210.0" rotate_start="0" rotate_end="360" img_name="./instance/114/MINUTEHAND.png" bind_data="10" period="10" display_mode="always" ambient_periodic="true"/>\r
-<!-- 秒钟 -->\r
-<rotate_img id="second" position="220 17" rotate_center="13.0 216.0" rotate_start="0" rotate_end="360" img_name="./instance/114/SECONDHAND.png" bind_data="12" period="60" display_mode="always" ambient_periodic="true"/>\r
-<!-- 通话\r
- <click rect="0 193 80 80" action_slice="84"></click>\r
- -->\r
-<!-- 天气 -->\r
-<click rect="193 0 80 80" action_slice="202"/>\r
-<!-- 支付宝\r
- <click rect="386 193 80 80" action_slice="98"></click>\r
- -->\r
-<!-- 每日活动 -->\r
-<click rect="193 396 80 80" action_slice="201"/>\r
-</dial>
\ No newline at end of file
+++ /dev/null
-<dial title="mirrorvoyager" description="镜影行者" size="466 466" version="2.0"\r
- preview_img="./instance/115/mirrorvoyager.png" ambient_period="60">\r
- <!-- 背景 -->\r
- <static_img id="back_ground" position="0 0" img_name="./instance/115/MAIN_FACE_IMAGE.png"></static_img>\r
-\r
- <!-- 星期显示 -->\r
- <option_img position="169 279"\r
- img_names="./instance/115/week/WEEK_SUN.png,./instance/115/week/WEEK_MON.png,./instance/115/week/WEEK_TUE.png,./instance/115/week/WEEK_WED.png,./instance/115/week/WEEK_THU.png,./instance/115/week/WEEK_FRI.png,./instance/115/week/WEEK_SAT.png"\r
- bind_data="17" period="10"></option_img>\r
- <!-- 日期显示 -->\r
- <label id="day_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
- rect="133 325 200 60" text="%0.f" font_size="26" align="center" bind_data="16" period="10"></label>\r
-\r
- <!-- 心率显示 -->\r
- <label id="heart_label" color="0xFFe30f0b" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
- rect="40 185 200 60" text="%0.f" font_size="30" align="center" bind_data="2"></label>\r
- <!-- 步数显示 -->\r
- <label id="step_label" color="0xFFe30f0b" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
- rect="226 185 200 60" text="%0.f" font_size="20" align="center" bind_data="1" period="10"></label>\r
-\r
- <!-- 卡路里显示 -->\r
- <label id="calories_label" color="0xFF000000" font="HarmonyOS_Sans_SC_Regular.ttf"\r
- break_mode="ellipsis"\r
- rect="29 340 200 60" text="%0.f" font_size="20" align="center" bind_data="3" period="10"></label>\r
- <!-- 电量显示 -->\r
- <label id="battery_label" color="0xFF000000" font="HarmonyOS_Sans_SC_Regular.ttf"\r
- break_mode="ellipsis" rect="232 340 200 60" text="%s" font_size="20" align="center"\r
- bind_data="20485" period="10"></label>\r
-\r
- <!-- 小时 -->\r
- <rotate_img id="hour" position="212 75" rotate_center="21.0 158.0" rotate_start="0"\r
- rotate_end="360" img_name="./instance/115/HOURHAND.png" bind_data="9" period="10" display_mode="always" ambient_periodic="true"></rotate_img>\r
- <!-- 分钟 -->\r
- <rotate_img id="minute" position="218 23" rotate_center="15.0 210.0" rotate_start="0"\r
- rotate_end="360" img_name="./instance/115/MINUTEHAND.png" bind_data="10" period="10" display_mode="always" ambient_periodic="true"></rotate_img>\r
- <!-- 秒钟 -->\r
- <rotate_img id="second" position="220 17" rotate_center="13.0 216.0" rotate_start="0"\r
- rotate_end="360" img_name="./instance/115/SECONDHAND.png" bind_data="12" period="10" display_mode="always" ambient_periodic="true"></rotate_img>\r
-\r
- <!-- 秒进度条-->\r
- <arc_progress id="second_progress" rect="0 0 466 466" color="0xAA191919" cap_type="none"\r
- radius="233" background_color="0x00FFFFFF" start_angle="0" end_angle="360" line_width="26"\r
- bind_data="32" period="10"></arc_progress>\r
-\r
-\r
- <!-- 步数 -->\r
- <click rect="0 193 80 80" action_slice="201"></click>\r
- <!-- 心率 -->\r
- <click rect="386 193 80 80" action_slice="205"></click>\r
-</dial>
\ No newline at end of file
+++ /dev/null
-<dial title="clock" description="main clock" size="454 454" version="1.0" preview_img="./instance/analogue_dial/preview_img.JPG">\r
- <static_img id="back_ground" position="0 0" img_name="./instance/analogue_dial/MAIN_FACE_IMAGE.png"></static_img>\r
- <option_img position="207 127" img_names="./instance/analogue_dial/week/MONDAY_IMAGE_PATH.png,./instance/analogue_dial/week/TUESDAY_IMAGE_PATH.png,./instance/analogue_dial/week/WEDNESDAY_IMAGE_PATH.png,./instance/analogue_dial/week/THURSDAY_IMAGE_PATH.png,./instance/analogue_dial/week/FIRDAY_IMAGE_PATH.png,./instance/analogue_dial/week/SATURDAY_IMAGE_PATH.png,./instance/analogue_dial/week/SUNDAY_IMAGE_PATH.png" bind_data="17" period="10"></option_img>\r
- <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="100 230 75 35" text="%5.0f" font_size="25" align="center" bind_data="1" period="10"></label>\r
- <static_img id="heart_rate" position="156 260" img_name="./instance/analogue_dial/HEARTRATE_IMAGE_PATH.png"></static_img>\r
- <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="198 330 60 35" text="%3.0f" font_size="25" align="center" bind_data="2" period="10"></label>\r
- <static_img id="progress" position="53 54" img_name="./instance/analogue_dial/PROGRESS_IMAGE_PATH.png"></static_img>\r
- <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="315 230 60 35" text="%2.0f%%" font_size="25" align="center" bind_data="8" period="10"></label>\r
- <rotate_img id="hour" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
- <static_img id="hour_circle" position="202 202" img_name="./instance/analogue_dial/BIGCIRCLE_IMAGE_PATH.png"></static_img>\r
- <rotate_img id="minute" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
- <static_img id="minute_circle" position="202 202" img_name="./instance/analogue_dial/MEDCIRCLE_IMAGE_PATH.png"></static_img>\r
- <rotate_img id="second" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/analogue_dial/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
- <static_img id="second_circle" position="215 213" img_name="./instance/analogue_dial/SMALLCIRCLE_IMAGE_PATH.png"></static_img>\r
-</dial>
\ No newline at end of file
+++ /dev/null
-<dial title="kaleidoscope" description="kaleidoscope dial" size="454 454" version="1.0" preview_img="./instance/kaleidoscope_dial/preview_img.PNG">\r
- <kaleidoscope id="kale" img_name="./instance/kaleidoscope_dial/rabbit454.png" crown_rotate_step="0.2" animator_rotate_step="0.1"></kaleidoscope>\r
- <rotate_img id="hour" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
- <static_img id="hour_circle" position="202 202" img_name="./instance/kaleidoscope_dial/BIGCIRCLE_IMAGE_PATH.png"></static_img>\r
- <rotate_img id="minute" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
- <static_img id="minute_circle" position="202 202" img_name="./instance/kaleidoscope_dial/MEDCIRCLE_IMAGE_PATH.png"></static_img>\r
- <rotate_img id="second" position="202 16" rotate_center="25.0 211.0" rotate_start="0" rotate_end="360" img_name="./instance/kaleidoscope_dial/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
- <static_img id="second_circle" position="215 213" img_name="./instance/kaleidoscope_dial/SMALLCIRCLE_IMAGE_PATH.png"></static_img>\r
-</dial>
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python\r
-# coding: utf-8\r
-import sys\r
-import os\r
-import argparse\r
-from converter import DialConvertTool\r
-import time\r
-\r
-def GetParameters():\r
- parser = argparse.ArgumentParser()\r
-\r
- parser.add_argument('-file', '-f', type=str, default='', required=False,\r
- help='The svg file need to be converted.')\r
-\r
- parser.add_argument('-dir', '-d', type=str, default='', required=False,\r
- help='The directory needs to be converted.')\r
-\r
- parser.add_argument('-output', type=str, default=os.getcwd() + "/out", required=False,\r
- help='output dir')\r
-\r
- config = parser.parse_args()\r
- return config\r
-\r
-def main():\r
- # 使用 time.time() 获取 Unix 时间戳(秒)\r
- start_unix_time = time.time()\r
- start_perf_time = time.perf_counter() # 用于计算精确耗时\r
- \r
- print(f"=== 转换开始 ===")\r
- # 使用 gmtime() 避免时区问题\r
- print(f"开始时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(start_unix_time))} UTC")\r
-\r
- userInput = GetParameters()\r
- outputPath = userInput.output\r
- inputFile = userInput.file\r
- inputDir = userInput.dir\r
-\r
- # 创建输出文件夹\r
- print(f"输出目录:{outputPath}")\r
- if not os.path.exists(outputPath):\r
- os.makedirs(outputPath, exist_ok=True) # 使用 makedirs 确保多级目录创建\r
-\r
- # 处理单个文件\r
- if inputFile and not os.path.isdir(inputFile) and inputFile.lower().endswith(".xml"):\r
- print(f"处理文件:{inputFile}")\r
- converter = DialConvertTool()\r
- converter.convert_xml_to_output(inputFile, outputPath)\r
-\r
- # 处理目录下的所有文件\r
- if inputDir:\r
- print(f"处理目录:{inputDir}")\r
- try:\r
- files = os.listdir(inputDir)\r
- for file in files:\r
- file_path = os.path.join(inputDir, file)\r
- if not os.path.isdir(file_path) and file.lower().endswith(".xml"):\r
- print(f"处理文件:{file_path}")\r
- converter = DialConvertTool()\r
- converter.convert_xml_to_output(file_path, outputPath)\r
- except Exception as e:\r
- print(f"处理目录时出错:{str(e)}")\r
-\r
- # 计算总耗时\r
- end_perf_time = time.perf_counter()\r
- total_duration = end_perf_time - start_perf_time\r
- \r
- end_unix_time = start_unix_time + total_duration # 推算结束时间戳\r
- print("\n=== 转换完成 ===")\r
- print(f"结束时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(end_unix_time))} UTC")\r
- print(f"总耗时:{total_duration:.2f} 秒({total_duration*1000:.0f} 毫秒)")\r
-\r
-if __name__ == "__main__":\r
- main()
\ No newline at end of file
+++ /dev/null
-usage: main.py [-h] [-file FILE] [-dir DIR] [-output OUTPUT]\r
-\r
-options:\r
- -h, --help show this help message and exit\r
- -file FILE, -f FILE The svg file need to be converted.\r
- -dir DIR, -d DIR The directory needs to be converted.\r
- -output OUTPUT output dir\r
-\r
-example:\r
-windows: python .\main.py -dir .\instance\analogue_dial\r
-windows: python .\main.py -dir .\instance\kaleidoscope_dial
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from enum import Enum
-from ctypes import *
-
-class Point(Structure):
- _fields_ = [
- ('x', c_short),
- ('y', c_short),
- ]
-
-class Rect(Structure):
- _fields_ = [
- ('x', c_short),
- ('y', c_short),
- ('w', c_ushort),
- ('h', c_ushort)
- ]
-
-class ColorStop(Structure):
- _fields_ = [
- ('stop', c_float),
- ('color', c_uint),
- ]
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import os
-import re
-import struct
-import ctypes
-from ctypes import *
-import xml.sax
-from enum import Enum
-import img_convert
-import video_convert
-from dial_static_img import DialStaticImg
-from dial_sequence_img import DialSequenceImg
-from dial_rotate_img import DialRotateImg
-from dial_option_img import DialOptionImg
-from dial_digital_img import DialDigitalImg
-from dial_label import DialLabel
-from dial_arc_label import DialArcLabel
-from dial_box_progress import DialBoxProgress
-from dial_arc_progress import DialArcProgress
-from dial_video import DialVideo
-from dial_click import DialClick
-from dial_kaleidoscope import DialKaleidoscope
-
-class DialHeader(Structure):
- _fields_ = [
- ('dialName', c_char * 16),
- ('width', c_short),
- ('height', c_short),
- ('version', c_char * 16),
- ('previewImgId', c_ushort),
- ('description', c_char * 128),
- ('imgoffset', c_uint),
- ('period', c_ubyte),
- ('dialViewCount', c_ubyte),
- ]
-
- def __init__(self):
- self.imgoffset = 0
- self.dialViewCount = 0
- self.period = 0
- self.viewType = []
- self.viewPt = []
-
- def parse_attributes(self, attributes):
- title = attributes["title"]
- self.dialName = bytes(title, encoding = "utf8")
-
- description = attributes["description"]
- self.description = bytes(description, encoding = "utf8")
-
- size = attributes["size"]
- width,height = size.split(' ')
- self.width = int(width)
- self.height = int(height)
-
- version = attributes["version"]
- self.version = bytes(version, encoding = "utf8")
-
- previewStr = attributes["preview_img"]
- self.previewImgId = img_convert.instance.convert_img(previewStr)
-
- for attr in attributes.getNames():
- if attr == "tile_width":
- tile_width = int(attributes["tile_width"])
- img_conver.instance.set_tile_width(tile_width)
-
- def add_view(self, viewObj, viewType):
- self.viewPt.append(viewObj)
- self.viewType.append(viewType)
- self.dialViewCount += 1
-
- def get_bytes(self):
- ret = bytes(self)
- for index in range(self.dialViewCount):
- ret += struct.pack('@b', self.viewType[index])
- return ret
-
- def get_size(self):
- return sizeof(self) + sizeof(c_ubyte) * self.dialViewCount
-
-class DialConvertTool(xml.sax.ContentHandler):
- parser = xml.sax.make_parser()
- DIAL_STATIC_IMG_TYPE = 0
- DIAL_SEQUENCE_IMG_TYPE = 1
- DIAL_ROTATE_IMG_TYPE = 2
- DIAL_OPTION_IMG_TYPE = 3
- DIAL_DIGITAL_IMG_TYPE = 4
- DIAL_LABEL_TYPE = 5
- DIAL_ARC_LABEL_TYPE = 6
- DIAL_BOX_PROGRESS_TYPE = 7
- DIAL_ARC_PROGRESS_TYPE = 8
- DIAL_VIDEO_TYPE = 9
- DIAL_CLICK_TYPE = 10
- DIAL_KALEIDOSCCOPE_TYPE = 11
-
- def __init__(self):
- self.inFile = ""
- self.outPath = ""
- self.header = DialHeader()
- self.parser.setFeature(xml.sax.handler.feature_namespaces, 0)
- self.parser.setContentHandler(self)
-
- def startElement(self, tag, attributes):
- viewTypeArray = []
- if tag == "dial":
- self.header.parse_attributes(attributes)
- elif tag == "static_img":
- view = DialStaticImg()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_STATIC_IMG_TYPE)
- elif tag == "sequence_img":
- view = DialSequenceImg()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_SEQUENCE_IMG_TYPE)
- elif tag == "rotate_img":
- view = DialRotateImg()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_ROTATE_IMG_TYPE)
- elif tag == "option_img":
- view = DialOptionImg()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_OPTION_IMG_TYPE)
- elif tag == "digital_img":
- view = DialDigitalImg()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_DIGITAL_IMG_TYPE)
- elif tag == "label":
- view = DialLabel()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_LABEL_TYPE)
- elif tag == "arc_label":
- view = DialArcLabel()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_ARC_LABEL_TYPE)
- elif tag == "box_progress":
- view = DialBoxProgress()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_BOX_PROGRESS_TYPE)
- elif tag == "arc_progress":
- view = DialArcProgress()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_ARC_PROGRESS_TYPE)
- elif tag == "video":
- view = DialVideo()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_VIDEO_TYPE)
- elif tag == "click":
- view = DialClick()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_CLICK_TYPE)
- elif tag == "kaleidoscope":
- view = DialKaleidoscope()
- view.parse_attributes(attributes)
- self.header.add_view(view, self.DIAL_KALEIDOSCCOPE_TYPE)
-
- def endElement(self, tag):
- if tag == "dial":
- # create & open dstfile
- outputfile = self.outPath + "/" + os.path.basename(self.inFile)[:-3] + "bin"
- fb = open(outputfile, 'wb')
- os.chmod(outputfile, 0o0755)
- self._write_data_to_bin(fb)
- fb.close()
-
- def convert_xml_to_output(self, inFile, outPath):
- self.inFile = inFile
- self.outPath = outPath
- self.parser.parse(inFile)
-
- def _write_data_to_bin(self, fb):
- self.header.imgoffset += self.header.get_size()
- for view in self.header.viewPt:
- if self.header.period < view.period:
- self.header.period = view.period
- self.header.imgoffset += view.get_size()
-
- fb.write(self.header.get_bytes())
- for view in self.header.viewPt:
- if isinstance(view, DialVideo):
- view.offset += self.header.imgoffset + img_convert.instance.get_size()
- fb.write(view.get_bytes())
- img_convert.instance.write_data_to_bin(fb)
- video_convert.instance.write_data_to_bin(fb)
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-
-class DialArcLabel(Structure):
- _fields_ = [
- ('align', c_ubyte),
- ('fontSize', c_ubyte),
- ('center', Point),
- ('radius', c_ushort),
- ('rotateStart', c_short),
- ('rotaeteEnd', c_short),
- ('color', c_uint),
- ('fontName', c_char * 64),
- ('text', c_char * 64),
- ('bindData', c_short),
- ('isPeriod', c_bool)
- ]
- def __init__(self):
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- alignStr = attributes["align"]
- if alignStr == "bottom":
- self.align = 4
- elif alignStr == "top":
- self.align = 3
- elif alignStr == "center":
- self.align = 2
- elif alignStr == "right":
- self.align = 1
- else:
- self.align = 0
-
- self.fontSize = int(attributes["font_size"])
-
- x,y = attributes["center"].split(" ")
- self.center.x = int(x)
- self.center.y = int(y)
-
- self.radius = int(attributes["radius"])
- self.rotateStart = int(attributes["start_angle"])
- self.rotaeteEnd = int(attributes["end_angle"])
- self.color = int(attributes["color"], 16)
- self.fontName = bytes(attributes["font"], encoding = "utf8")
- self.text = bytes(attributes["text"], encoding = "utf8")
- for attr in attributes.getNames():
- if attr == "bind_data":
- self.bindData = int(attributes["bind_data"])
- elif attr == "period":
- self.period = int(attributes["period"])
- if self.period != 0:
- self.isPeriod = True
- if self.isPeriod != 0 and self.bindData == 0:
- print("[ERROR]:[bind_data] is not set, [period] cannot be set")
- sys.exit(1)
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Rect
-from common_types import ColorStop
-import img_convert
-
-class ProgressUnion(Union):
- _fields_ = [
- ('stopCount', c_ubyte),
- ('imgId', c_ushort),
- ('color', c_uint),
- ]
-
-class DialArcProgress(Structure):
- _fields_ = [
- ('cap', c_ubyte),
- ('isPeriod', c_bool),
- ('radius', c_ushort),
- ('startAngle', c_ushort),
- ('endAngle', c_ushort),
- ('lineWidth', c_ushort),
- ('bindData', c_short),
- ('bgColor', c_uint),
- ('type', c_ubyte),
- ('rect', Rect),
- ('unionValue', ProgressUnion)
- ]
-
- def __init__(self):
- self.stop = []
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- x,y,w,h = attributes["rect"].split(" ")
- self.rect.x = int(x)
- self.rect.y = int(y)
- self.rect.w = int(w)
- self.rect.h = int(h)
-
- cap = attributes["cap_type"]
- if cap == "round":
- self.cap = 1
- else:
- self.cap = 0
-
- self.radius = int(attributes["radius"])
- self.startAngle = int(attributes["start_angle"])
- self.endAngle = int(attributes["end_angle"])
- self.lineWidth = int(attributes["line_width"])
- self.bindData = int(attributes["bind_data"])
-
- attrList = attributes.getNames()
- for attr in attrList:
- if attr == "img_name":
- self.unionValue.imgId = img_convert.instance.convert_img(attributes["img_name"])
- self.type = 0
- break
- elif attr == "color":
- self.unionValue.color = int(attributes["color"], 16)
- self.type = 1
- break
- elif attr == "gradient_colors":
- self.type = 2
- stopList = attributes["gradient_stops"].split(" ")
- colorList = attributes["gradient_colors"].split(" ")
- if len(stopList) != len(colorList):
- print("[ERROR]:[gradient_stops] attr not equal [colorList] attr")
- self.unionValue.stopCount = min(len(colorList), len(stopList))
- for index in range(self.unionValue.stopCount):
- colorStop = ColorStop()
- colorStop.stop = float(stopList[index])
- colorStop.color = int(colorList[index], 16)
- self.stop.append(colorStop)
- break
-
- if "period" in attrList:
- self.period = int(attributes["period"])
- if (self.period != 0):
- self.isPeriod = True
-
- if "background_color" in attrList:
- self.bgColor = int(attributes["background_color"], 16)
-
- def get_bytes(self):
- ret = bytes(self)
- if self.type == 2:
- for stop in self.stop:
- ret += bytes(stop)
- return ret
-
- def get_size(self):
- ret = sizeof(self)
- if self.type == 2:
- for stop in self.stop:
- ret += sizeof(stop)
- return ret
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Rect
-from common_types import ColorStop
-import img_convert
-
-class ProgressUnion(Union):
- _fields_ = [
- ('stopCount', c_ubyte),
- ('imgId', c_ushort),
- ('color', c_uint),
- ]
-
-class DialBoxProgress(Structure):
- _fields_ = [
- ('cap', c_ubyte),
- ('direction', c_ubyte),
- ('isPeriod', c_bool),
- ('bindData', c_short),
- ('bgColor', c_uint),
- ('type', c_ubyte),
- ('rect', Rect),
- ('unionValue', ProgressUnion)
- ]
-
- def __init__(self):
- self.stop = []
- self.isPeriod = False
- self.period = 0
-
- def parse_attributes(self, attributes):
- x,y,w,h = attributes["rect"].split(" ")
- self.rect.x = int(x)
- self.rect.y = int(y)
- self.rect.w = int(w)
- self.rect.h = int(h)
-
- cap = attributes["cap_type"]
- if cap == "round":
- self.cap = 1
- else:
- self.cap = 0
-
- direction = attributes["direction"]
- if direction == "left_to_right":
- self.direction = 0
- elif direction == "right_to_left":
- self.direction = 1
- elif direction == "top_to_bottom":
- self.direction = 2
- elif direction == "bottom_to_top":
- self.direction = 3
-
- self.bindData = int(attributes["bind_data"])
-
- attrList = attributes.getNames()
- for attr in attrList:
- if attr == "img_name":
- self.unionValue.imgId = img_convert.instance.convert_img(attributes["img_name"])
- self.type = 0
- break
- elif attr == "color":
- self.unionValue.color = int(attributes["color"], 16)
- self.type = 1
- break
- elif attr == "gradient_colors":
- stopList = attributes["gradient_stops"].split(" ")
- colorList = attributes["gradient_colors"].split(" ")
- if len(stopList) != len(colorList):
- print("[ERROR]:[gradient_stops] attr not equal [colorList] attr")
- self.unionValue.stopCount = min(len(colorList), len(stopList))
- for index in range(self.unionValue.stopCount):
- colorStop = ColorStop()
- colorStop.stop = float(stopList[index])
- colorStop.color = int(colorList[index], 16)
- self.stop.append(colorStop)
- self.type = 2
- break
-
- if "period" in attrList:
- self.period = int(attributes["period"])
- if (self.period != 0) :
- self.isPeriod = True
- if "background_color" in attrList:
- self.bgColor = int(attributes["background_color"], 16)
-
- def get_bytes(self):
- ret = bytes(self)
- if self.type == 2:
- for stop in self.stop:
- ret += bytes(stop)
- return ret
-
- def get_size(self):
- ret = sizeof(self)
- if self.type == 2:
- for stop in self.stop:
- ret += sizeof(stop)
- return ret
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Rect
-
-class ClickTypeUnion(Union):
- _fields_ = [
- ('sliceId', c_uint),
- ('bundleName', c_char * 64)
- ]
-
-class DialClick(Structure):
- _fields_ = [
- ('type', c_ubyte),
- ('rect', Rect),
- ('unionType', ClickTypeUnion),
- ]
-
- def __init__(self):
- self.period = 0
-
- def parse_attributes(self, attributes):
- x,y,w,h = attributes["rect"].split(" ")
- self.rect.x = int(x)
- self.rect.y = int(y)
- self.rect.w = int(w)
- self.rect.h = int(h)
-
- for attr in attributes.getNames():
- if attr == "action_slice":
- self.unionType.sliceId = int(attributes["action_slice"])
- self.type = 0
- break
- elif attr == "action_bundle":
- self.unionType.bundleName = bytes(attributes["action_bundle"], encoding = "utf8")
- self.type = 1
- break
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-import img_convert
-
-class DialDigitalImg(Structure):
- _fields_ = [
- ('alignType', c_ubyte, 4),
- ('integerLength', c_ubyte, 4),
- ('decimalPrecision', c_ubyte),
- ('imgIds', c_ushort * 10),
- ('signImgId', c_ushort),
- ('decimalPointImgId', c_ushort),
- ('space', c_ushort),
- ('alignPosition', Point),
- ('bindData', c_short),
- ('isPeriod', c_bool)
- ]
-
- def __init__(self):
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- imgNames = attributes["img_names"].split(",")
- length = len(imgNames)
- if length < 10:
- print("[ERR]:tag:[digital_img] attr[img_names] less than 10!")
- sys.exit(1)
- else:
- for index in range(10):
- self.imgIds[index] = img_convert.instance.convert_img(imgNames[index])
-
- self.space = int(attributes["space"])
- alignStr = attributes["align"]
- if alignStr == "right":
- self.alignType = 2
- elif alignStr == "center":
- self.alignType = 1
- else:
- self.alignType = 0
- x,y = attributes["align_pos"].split(" ")
- self.alignPosition.x = int(x)
- self.alignPosition.y = int(y)
- self.bindData = int(attributes["bind_data"])
-
- for attr in attributes.getNames():
- if attr == "sign_img_name":
- signImgName = attributes["sign_img_name"]
- self.signImgId = img_convert.instance.convert_img(signImgName)
- elif attr == "integer_length":
- self.integerLength = int(attributes["integer_length"])
- elif attr == "img_decimal_point":
- decimalPointImgName = attributes["img_decimal_point"]
- self.decimalPointImgId = img_convert.instance.convert_img(decimalPointImgName)
- elif attr == "decimal_precision":
- self.decimalPrecision = int(attributes["decimal_precision"])
- elif attr == "period":
- self.period = int(attributes["period"])
- if self.period != 0:
- self.isPeriod = True
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-import img_convert
-
-class DialKaleidoscope(Structure):
- _fields_ = [
- ('imgId', c_ushort),
- ('rotateEventFactor', c_float),
- ('rotateAnimatorValue', c_float)
- ]
-
- def __init__(self):
- self.imgId = 0
- self.rotateEventFactor = 1.0
- self.rotateAnimatorValue = 0.0
- self.period = 0
-
- def parse_attributes(self, attributes):
- self.imgId = img_convert.instance.convert_img(attributes["img_name"])
- for attr in attributes.getNames():
- if attr == "crown_rotate_step":
- self.rotateEventFactor = float(attributes["crown_rotate_step"])
- elif attr == "animator_rotate_step":
- self.rotateAnimatorValue = float(attributes["animator_rotate_step"])
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Rect
-
-class DialLabel(Structure):
- _fields_ = [
- ('breakMode', c_ubyte),
- ('align', c_ubyte),
- ('fontSize', c_ubyte),
- ('isPeriod', c_bool),
- ('rect', Rect),
- ('color', c_uint),
- ('fontName', c_char * 64),
- ('text', c_char * 64),
- ('bindData', c_short)
- ]
-
- def __init__(self):
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- x,y,w,h = attributes["rect"].split(" ")
- self.rect.x = int(x)
- self.rect.y = int(y)
- self.rect.w = int(w)
- self.rect.h = int(h)
-
- mode = attributes["break_mode"]
- if mode == "adapt":
- self.breakMode = 0
- elif mode == "stretch":
- self.breakMode = 1
- elif mode == "wrap":
- self.breakMode = 2
- elif mode == "ellipsis":
- self.breakMode = 3
- elif mode == "marquee":
- self.breakMode = 4
- elif mode == "clip":
- self.breakMode = 5
- else:
- self.breakMode = 3
- print("[WARING][label:break_mode]Incorrect input:", mode)
-
- alignStr = attributes["align"]
- if alignStr == "bottom":
- self.align = 4
- elif alignStr == "top":
- self.align = 3
- elif alignStr == "center":
- self.align = 2
- elif alignStr == "right":
- self.align = 1
- elif alignStr == "left":
- self.align = 0
- else:
- self.align = 0
- print("[WARING][label:align]Incorrect input:", alignStr)
-
- self.fontSize = int(attributes["font_size"])
- self.color = int(attributes["color"], 16)
- self.fontName = bytes(attributes["font"], encoding = "utf8")
- self.text = bytes(attributes["text"], encoding = "utf8")
-
- for attr in attributes.getNames():
- if attr == "bind_data":
- self.bindData = int(attributes["bind_data"])
- elif attr == "period":
- self.period = int(attributes["period"])
- if self.period != 0:
- self.isPeriod = True
- if self.isPeriod != 0 and self.bindData == 0:
- print("[ERROR]:[bind_data] is not set, [period] cannot be set")
- sys.exit(1)
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-import img_convert
-
-class DialOptionImg(Structure):
- _fields_ = [
- ('pos', Point),
- ('bindData', c_short),
- ('isPeriod', c_bool),
- ('count', c_ubyte),
- ]
-
- def __init__(self):
- self.imgId = []
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- x,y = attributes["position"].split(" ")
- self.pos.x = int(x)
- self.pos.y = int(y)
-
- self.bindData = int(attributes["bind_data"])
-
- imgNames = attributes["img_names"].split(",")
- self.count = len(imgNames)
- for img in imgNames:
- imgId = img_convert.instance.convert_img(img)
- self.imgId.append(imgId)
-
- if "period" in attributes.getNames():
- self.period = int(attributes["period"])
- if self.period != 0:
- self.isPeriod = True
-
- def get_bytes(self):
- ret = bytes(self)
- for index in range(self.count):
- ret += struct.pack('@H', self.imgId[index])
- return ret
-
- def get_size(self):
- return sizeof(self) + sizeof(c_ushort) * self.count
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-import img_convert
-
-class DialRotateImg(Structure):
- _fields_ = [
- ('pos', Point),
- ('center', Point),
- ('rotateStart', c_short),
- ('rotaeteEnd', c_short),
- ('imgId', c_ushort),
- ('bindData', c_short),
- ('isPeriod', c_bool)
- ]
-
- def __init__(self):
- self.period = 0
- self.isPeriod = False
-
- def parse_attributes(self, attributes):
- x,y = attributes["position"].split(" ")
- self.pos.x = int(x)
- self.pos.y = int(y)
-
- x,y = attributes["rotate_center"].split(" ")
- self.center.x = round(float(x))
- self.center.y = round(float(y))
-
- self.rotateStart = int(attributes["rotate_start"])
- self.rotaeteEnd = int(attributes["rotate_end"])
-
- self.bindData = int(attributes["bind_data"])
-
- self.imgId = img_convert.instance.convert_img(attributes["img_name"])
- if "period" in attributes.getNames():
- self.period = int(attributes["period"])
- if self.period != 0:
- self.isPeriod = True
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-import img_convert
-
-class DialSequenceImg(Structure):
- _fields_ = [
- ('pos', Point),
- ('interval', c_ushort),
- ('repeat', c_bool),
- ('imgNum', c_ubyte),
- ]
-
- def __init__(self):
- self.imgId = []
- self.period = 0
-
- def parse_attributes(self, attributes):
- x,y = attributes["position"].split(" ")
- self.pos.x = int(x)
- self.pos.y = int(y)
-
- if attributes["repeat"].lower() == "true":
- self.repeat = True
- elif attributes["repeat"].lower() == "false":
- self.repeat = False
-
- interval = int(attributes["interval"])
- if interval < 0:
- print("[ERROR]: [interval] attr less than 0")
- sys.exit(1)
- else:
- self.interval = interval
-
- imgNames = attributes["img_names"].split(",")
- self.imgNum = len(imgNames)
- for img in imgNames:
- imgId = img_convert.instance.convert_img(img)
- self.imgId.append(imgId)
-
- def get_bytes(self):
- ret = bytes(self)
- for index in range(self.imgNum):
- ret += struct.pack('@H', self.imgId[index])
- return ret
-
- def get_size(self):
- return sizeof(self) + sizeof(c_ushort) * self.imgNum
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Point
-import img_convert
-
-class DialStaticImg(Structure):
- _fields_ = [
- ('pos', Point),
- ('center', Point),
- ('rotate', c_float),
- ('imgId', c_ushort)
- ]
-
- def __init__(self):
- self.imgId = 0
- self.pos.x = 0
- self.pos.y = 0
- self.center.x = 0
- self.center.y = 0
- self.rotate = 0.0
- self.period = 0
-
- def parse_attributes(self, attributes):
- x,y = attributes["position"].split(" ")
- self.pos.x = int(x)
- self.pos.y = int(y)
-
- self.imgId = img_convert.instance.convert_img(attributes["img_name"])
-
- for attr in attributes.getNames():
- if attr == "center":
- x,y = attributes["center"].split(" ")
- self.center.x = int(x)
- self.center.y = int(y)
- elif attr == "rotate":
- self.rotate = float(attributes["rotate"])
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-from xml.dom.minidom import parse
-from ctypes import *
-from common_types import Rect
-import video_convert
-import img_convert
-
-class DialVideo(Structure):
- _fields_ = [
- ('rect', Rect),
- ('offset', c_uint),
- ('colorKey', c_uint),
- ('imgId', c_uint),
- ]
-
- def __init__(self):
- self.period = 0
-
- def parse_attributes(self, attributes):
- x,y,w,h = attributes["rect"].split(" ")
- self.rect.x = int(x)
- self.rect.y = int(y)
- self.rect.w = int(w)
- self.rect.h = int(h)
-
- self.colorKey = int(attributes["color_key"], 16)
-
- self.offset = video_convert.instance.convert_video(attributes["source"])
-
- self.imgId = img_convert.instance.convert_img(attributes["preview_frame"])
-
- def get_bytes(self):
- return bytes(self)
-
- def get_size(self):
- return sizeof(self)
\ No newline at end of file
+++ /dev/null
-import base64
-from PIL import Image
-from io import BytesIO
-import cv2
-import ctypes
-from ctypes import *
-from PIL import Image
-
-import os
-import sys
-import struct
-import time
-import platform
-import numpy as np
-import pickle as p
-import requests
-import matplotlib.pyplot as pyplot
-
-global dll
-if platform.system().lower() == 'windows':
- dll = ctypes.CDLL(r".\dll\x64\release_cs\ICE_V5R1_BLOCK_HTC.dll")
-elif platform.system().lower() == 'linux':
- dll = ctypes.CDLL(sys.path[0] + r"/dll/linux_cs/libcodec.so")
-
-class Header(ctypes.Structure):
- _fields_ = [
- ("width", c_uint),
- ("height", c_uint),
- ("stride", c_uint),
- ("pixel_format", c_uint),
- ("tile_width", c_uint),
- ("mode_alpha", c_uint),
- ("mode_rgb", c_uint)
- ]
-
-class BsData(ctypes.Structure):
- _fields_ = [
- ("bs_data", POINTER(c_ubyte)),
- ("data_size", c_uint),
- ("cmp_ratio", c_uint),
- ("is_valid", c_uint),
- ("subjective_review", c_uint),
- ("para", Header)
- ]
-
-class AutoCmpOutput(ctypes.Structure):
- _fields_ = [
- ("cmp_bs0", POINTER(BsData)),
- ("cmp_bs1", POINTER(BsData)),
- ("cmp_bs2", POINTER(BsData)),
- ("cmp_bs3", POINTER(BsData)),
- ("auto_cmp_mode", c_uint),
- ("valid_bs_num", c_uint)
- ]
-
-class CmpInput(ctypes.Structure):
- _fields_ = [
- ("width", c_uint),
- ("height", c_uint),
- ("stride", c_uint),
- ("pixel_format", c_uint),
- ("tile_width", c_uint),
- ("mode_alpha", c_uint),
- ("mode_rgb", c_uint),
- ("red_channel", POINTER(c_ubyte)),
- ("green_channel", POINTER(c_ubyte)),
- ("blue_channel", POINTER(c_ubyte)),
- ("alpha_channel", POINTER(c_ubyte))
- ]
-
-class AutoCmpInput(ctypes.Structure):
- _fields_ =[
- ("auto_cmp_mode", c_uint),
- ("high_quality_mode", c_uint),
- ("high_cmp_ratio_mode", c_uint),
- ("cmp_in", POINTER(CmpInput))
- ]
-
-class BinHeader(ctypes.Structure):
- _fields_ = [
- ("dirId", c_uint),
- ("count", c_uint)
- ]
-
-class SeekInfo(ctypes.Structure):
- _fields_ = [
- ("offset", c_uint),
- ("size", c_uint)
- ]
-
-class ImageHeader(ctypes.Structure):
- _fields_ = [
- ("colorMode", c_uint, 8),
- ("version", c_uint, 4),
- ("compressMode", c_uint, 4),
- ("reserved", c_uint, 16),
- ("width", c_ushort),
- ("height", c_ushort)
- ]
-
-class ImageConverTool():
- binHeader = BinHeader()
- binHeader.dirId = 0xfef
- seekInfo = []
- imageHeader = []
- imageData = []
- imageNum = 0
- isConvertedFile = []
-
- def __init__(self):
- self.markCurOffset = 0
- self.width = 0
- self.height = 0
- self.file_alpha = False
- self.cmp_mode = "HFBC"
- self.color_fmt = ' '
- self.align = 1
- self.tile_width = 6
- self.mode_alpha = 1
- self.mode_rgb = 1
- self.auto_cmp_mode = 0
- self.high_quality_mode = 0
- self.high_cmp_ratio_mode = 0
- self.version = 1
-
- def set_tile_width(self, tile_width):
- if tile_width not in self.tile_width_support:
- print("[ERROR]:The tile_width value is not supported.")
- sys.exit(1)
-
- self.tile_width = tile_width
-
- def _convert(self):
- width, height = self.image.size
- self.width = width
- self.height = height
- self.stride_pixel = (self.width + self.align - 1) // self.align * self.align
- if len(self.image.split()) > 3:
- self.file_alpha = True
- else:
- self.file_alpha = False
-
- # initialize CmpInput
- cmp_input = CmpInput()
- self._get_cmp_input(cmp_input)
- auto_cmp_input = AutoCmpInput()
- self._get_auto_cmp_input(auto_cmp_input, cmp_input)
-
- # call GetBufferSize to get buffer size
- # initialize CmpOutput
- auto_cmp_output = AutoCmpOutput()
-
- cmp_bs0 = BsData()
- buf_size0 = dll.ice_v5r1_block_get_buffer_size(byref(cmp_input)) # 压缩后输出数据的大小
- cmp_bs0.bs_data = (c_ubyte * buf_size0)()
- auto_cmp_output.cmp_bs0 = ctypes.cast(pointer(cmp_bs0), POINTER(BsData))
- ret = dll.ice_v5r1_block_htc_auto_cmp(byref(auto_cmp_input), byref(auto_cmp_output)) # 对输入数据进行压缩返回值是函数正常运行标志位
-
- # add imageinfo to list
- self.binHeader.count += 1
-
- imageInfo = ImageHeader()
- imageInfo.width = self.width
- imageInfo.height = self.height
- imageInfo.colorMode = self._get_color_mode()
- imageInfo.version = 1
- imageInfo.compressMode = 4
- imageInfo.reserved = 0
- seekInfo = SeekInfo()
- seekInfo.offset = self.markCurOffset
- seekInfo.size = sizeof(imageInfo) + cmp_bs0.data_size
- self.markCurOffset += seekInfo.size
- self.seekInfo.append(seekInfo)
- self.imageHeader.append(imageInfo)
- self.imageData.append(cmp_bs0)
- self.imageNum += 1
- return self.imageNum
-
- def _check_path(self, path):
- if not os.path.exists(path):
- print("[ERROR]:", path, "is not exist")
- return False
- else:
- if (not path[-3:].lower() == "png") and (not path[-3:].lower() == "jpg"):
- print("[ERROR]:", path, "is not jpg or png format image")
- return False
- return True
-
- def convert_img(self, path):
- if path in self.isConvertedFile:
- return self.isConvertedFile.index(path) + 1
-
- if not self._check_path(path):
- sys.exit(1)
-
- self.image = Image.open(path)
- if self.image.mode == 'RGBA':
- self.color_fmt = 'ARGB8888'
- elif self.image.mode == 'RGB':
- self.color_fmt = 'RGB888'
- self.isConvertedFile.append(path)
- return self._convert()
-
- def _get_cmp_px_format(self):
- if self.color_fmt == 'RGB565':
- return 2
- elif self.color_fmt == 'RGB888':
- return 0
- elif self.color_fmt == 'ARGB8888':
- return 1
-
- def _get_color_mode(self):
- if self.color_fmt == 'RGB565':
- return 2
- elif self.color_fmt == 'RGB888':
- return 1
- elif self.color_fmt == 'ARGB8888':
- return 0
-
- def _get_auto_cmp_input(self, auto_cmp_input, cmp_input):
- auto_cmp_input.auto_cmp_mode = self.auto_cmp_mode
- auto_cmp_input.high_quality_mode = self.high_quality_mode
- auto_cmp_input.high_cmp_ratio_mode = self.high_cmp_ratio_mode
- auto_cmp_input.cmp_in = ctypes.cast(pointer(cmp_input), POINTER(CmpInput))
-
- def _get_cmp_input(self, cmp_input):
- cmp_input.width = self.width
- cmp_input.height = self.height
- cmp_input.stride = self.width
- cmp_input.tile_width = self.tile_width
- cmp_input.mode_alpha = self.mode_alpha
- cmp_input.mode_rgb = self.mode_rgb
- cmp_input.pixel_format = self._get_cmp_px_format()
- size = self.width * self.height
- red = (c_ubyte * size)()
- green = (c_ubyte * size)()
- blue = (c_ubyte * size)()
- alpha = (c_ubyte * size)()
-
- for row in range(self.height):
- for col in range(self.width):
- position = row * self.width + col
- red[position] = self.image.getdata()[position][0]
- green[position] = self.image.getdata()[position][1]
- blue[position] = self.image.getdata()[position][2]
- if self.file_alpha == False:
- alpha[position] = 0xFF
- else:
- alpha[position] = self.image.getdata()[position][3]
- cmp_input.red_channel = red
- cmp_input.green_channel = green
- cmp_input.blue_channel = blue
- cmp_input.alpha_channel = alpha
-
- def write_data_to_bin(self, fb):
- fb.write(bytes(self.binHeader))
- for seek in self.seekInfo:
- fb.write(bytes(seek))
-
- for index in range(0, self.imageNum):
- bt = bytearray()
- color_fmt = self.imageHeader[index].colorMode
- header = color_fmt + (self.imageHeader[index].width << 32) + \
- (self.imageHeader[index].height << 48) + (self.imageHeader[index].version << 8)
- header_bin = struct.pack("<Q", header)
-
- if (self.cmp_mode == "HFBC"):
- header = header + (4 << 12)
- elif (self.cmp_mode == "HFBC_ABYPASS"):
- header = header + (5 << 12)
-
- header_bin = struct.pack("<Q", header)
- bt += header_bin
- for i in range(self.imageData[index].data_size):
- bt += struct.pack("B", self.imageData[index].bs_data[i])
- fb.writelines([bt])
-
- def get_size(self):
- ret = sizeof(self.binHeader)
- ret += len(self.seekInfo) * sizeof(SeekInfo)
- for index in range(0, self.imageNum):
- bt = bytearray()
- color_fmt = self._get_cmp_px_format()
- header = color_fmt + (self.imageHeader[index].width << 32) + \
- (self.imageHeader[index].height << 48) + (self.imageHeader[index].version << 8)
- header_bin = struct.pack("<Q", header)
-
- if (self.cmp_mode == "HFBC"):
- header = header + (4 << 12)
- elif (self.cmp_mode == "HFBC_ABYPASS"):
- header = header + (5 << 12)
-
- header_bin = struct.pack("<Q", header)
- bt += header_bin
- for i in range(self.imageData[index].data_size):
- bt += struct.pack("B", self.imageData[index].bs_data[i])
- ret += len(bt)
- return ret
-
-instance = ImageConverTool()
+++ /dev/null
-<dial title="classic" description="经典表盘" size="410 502" version="1.0" preview_img="./instance/1052/classic.png">\r
- <static_img id="back_ground" position="0 0" img_name="./instance/1052/MAIN_FACE_IMAGE.png"></static_img>\r
- \r
- <!-- 月份显示 -->\r
- <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="149 329 60 30" text="%02.0f月" font_size="30" align="center" bind_data="18" period="10"></label>\r
- <!-- 日期显示 -->\r
- <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="210 329 60 30" text="%02.0f号" font_size="30" align="center" bind_data="16" period="10"></label>\r
- <!-- 星期显示 -->\r
- <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="166 366 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
-\r
-\r
- <!-- 电池进度条 -->\r
- <box_progress id="battery_progress" rect="181 74 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
- <!-- 电池图像 -->\r
- <option_img position="174 68" img_names="./instance/1052/Battery/Battery.png,./instance/1052/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
- <!-- 电池百分比标签 -->\r
- <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="229 68 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
-\r
- <!-- 时针 -->\r
- <rotate_img id="hour" position="193 87" rotate_center="12.0 146.0" rotate_start="0" rotate_end="360" img_name="./instance/1052/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
- <!-- 分针 -->\r
- <rotate_img id="minute" position="193 33" rotate_center="12.0 200.0" rotate_start="0" rotate_end="360" img_name="./instance/1052/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
- <!-- 秒针 -->\r
- <rotate_img id="second" position="193 28" rotate_center="12.0 205.0" rotate_start="0" rotate_end="360" img_name="./instance/1052/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
-\r
-</dial>
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-# 1\ 解析命令 python main.py -d [DIR] -o [OUT_DIR]
-# 2\ 循环执行svg解析写入
-import sys
-import os
-import argparse
-from converter import DialConvertTool
-
-def GetParameters():
- parser = argparse.ArgumentParser()
-
- parser.add_argument('-file', '-f', type=str, default='', required=False,
- help='The svg file need to be converted.')
-
- parser.add_argument('-dir', '-d', type=str, default='', required=False,
- help='The directory needs to be converted.')
-
- parser.add_argument('-output', type=str, default=os.getcwd() + "/out", required=False,
- help='output dir')
-
- config = parser.parse_args()
- return config
-
-if __name__ == "__main__":
- userInput = GetParameters()
- outputPath = userInput.output
- inputFile = userInput.file
- inputDir = userInput.dir
- # Create an output folder.
- print("output dir : " + outputPath)
- if not os.path.exists(outputPath):
- os.mkdir(outputPath)
-
- if not os.path.isdir(inputFile) and inputFile[-3:].lower() == "xml":
- print("input file : " + inputFile)
- converter = DialConvertTool()
- converter.convert_xml_to_output(inputFile, outputPath)
-
- files = os.listdir(inputDir)
- print("input dir : " + inputDir)
- for file in files:
- if not os.path.isdir(file) and file[-3:].lower() == "xml":
- print("xml file : " + file)
- converter = DialConvertTool()
- converter.convert_xml_to_output(inputDir + "/" + file, outputPath)
-
+++ /dev/null
-#!/bin/bash
-###
-# @Date: 2024-06-07 09:44:50
- # @LastEditors: Caisking 3449750381@qq.com
- # @LastEditTime: 2024-08-30 15:00:54
- # @FilePath: /FD230/tools/dial_converter_tool/make_tools/gen_dial_bin.sh
-###
-
-# 返回上一级目录
-cd ..
-
-# 检查并创建 out 和 dial_lzma 目录
-mkdir -p out dial_lzma
-
-# 检查是否传入参数
-if [ "$#" -gt 1 ]; then
- echo "Usage: $0 [dial_folder]"
- exit 1
-fi
-
-# 如果有参数,则处理指定的目录;否则处理所有子目录
-if [ "$#" -eq 1 ]; then
- subdirs=("instance/$1/")
- if [ ! -d "instance/$1" ]; then
- echo "Error: Specified directory 'instance/$1' does not exist."
- exit 1
- fi
-else
- subdirs=(instance/*/)
-fi
-
-for subdir in "${subdirs[@]}"; do
- # 提取子目录名称
- dial=$(basename "$subdir")
-
- # 查找子目录中的 XML 文件并提取文件名
- xml_file=$(find "$subdir" -maxdepth 1 -type f -name "*.xml" -printf "%f\n" | head -n 1)
- if [ -z "$xml_file" ]; then
- echo "Error: XML file not found in $subdir"
- continue
- fi
-
- # 计算文件数量和大小
- dialfilecount=$(find "$subdir" -maxdepth 1 -type f | wc -l)
- dialfilesize=$(du -sh "$subdir" | awk '{print $1}')
-
- # 输出统计信息
- echo "Processing $dial [$dialfilecount files, $dialfilesize size]"
-
- # 调用 main.py 处理子目录中的文件
- if ! python main.py -dir "$subdir" -output out/; then
- echo "Error processing directory $dial"
- continue
- fi
-
- # 压缩 .bin 文件到 .lzma 文件
- bin_file="out/${xml_file%.xml}.bin"
- lzma_file="dial_lzma/$dial/${xml_file%.xml}.lzma"
-
- # 创建必要的目录
- mkdir -p "$(dirname "$lzma_file")"
-
- # 使用 lzma_tool 压缩文件
- if ! ../../code/sdk/tools/bin/lzma_tool/lzma_tool -d12 -lc0 -lp0 e "$bin_file" "$lzma_file"; then
- echo " lzma_tool directory $dial error"
- else
- echo " lzma_tool directory $dial ok"
- fi
-done
\ No newline at end of file
+++ /dev/null
-## 在liunx环境运行表盘脚本\r
-\r
-# 1.下载对应模块\r
-pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Pillow\r
-\r
-pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python\r
-\r
-pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib\r
-\r
-## 2.对表盘工具进行赋权限\r
-\r
-chmod +x gen_dial_bin.sh\r
-./gen_dial_bin.sh\r
-\r
-## 3.制作运行单个表盘\r
-python ./main.py -dir ./instance/1028/ -output ./out/\r
-\r
-#使用lzma_tool工具需要赋权限\r
- chmod +x ../lzma_tool/lzma_tool\r
-\r
- ### 更新版本 0830\r
-- 制作单个表盘以及lzma文件 **./gen_dial_bin.sh + 表盘文件夹路径**\r
-\r
- ```\r
- 示例 ./gen_dial_bin.sh ../instance/114/\r
- ```\r
-\r
-- 制作所有的表盘以及lzma文件\r
-\r
- ```\r
- ./gen_dial_bin.sh\r
- ```\r
-\r
- \r
-\r
+++ /dev/null
-#!/usr/bin/python
-# coding: utf-8
-import sys
-import struct
-import ctypes
-from ctypes import *
-
-class VideoConvertTool:
- def __init__(self):
- self.videoNum = 0
- self.videoName = []
- self.videoIndex = []
- self.videoData = bytearray()
-
- def convert_video(self, path):
- if path in self.videoName:
- index = self.videoName.index(path)
- return self.videoIndex[index]
- fp = open(path, 'rb')
- data = fp.read()
- fp.close()
- self.videoName.append(path)
- self.videoNum += 1
- ret = len(self.videoData)
- self.videoIndex.append(ret)
- self.videoData += data
- return ret
-
- def write_data_to_bin(self, fb):
- fb.write(self.videoData)
-
-instance = VideoConvertTool()
+++ /dev/null
-新增video的预览帧功能。video标签新增属性 preview_frame。\r
-1、历史表盘有视频表盘需要重新用新工具生成。\r
-2、使用video标签实例如下\r
-<video id="video" rect="0 0 454 454" source="./instance/video_dial/demo.mp4" color_key="0xff212324" preview_frame="./instance/video_dial/video_frame.png"></video>
\ No newline at end of file
--- /dev/null
+#!/usr/bin/python\r
+# coding: utf-8\r
+# 1\ 解析命令 python main.py -d [DIR] -o [OUT_DIR]\r
+# 2\ 循环执行svg解析写入\r
+import sys\r
+import os\r
+import argparse\r
+from converter import DialConvertTool\r
+\r
+def GetParameters():\r
+ parser = argparse.ArgumentParser()\r
+\r
+ parser.add_argument('-file', '-f', type=str, default='', required=False,\r
+ help='Specifies the path of the offline watch face XML file to be converted.')\r
+\r
+ parser.add_argument('-dir', '-d', type=str, default='', required=False,\r
+ help='Specifies the path of the folder to be converted. Convert all .xml files in the folder according to the specified path.')\r
+\r
+ parser.add_argument('-output', type=str, default=os.getcwd() + "/out", required=False,\r
+ help='output dir')\r
+\r
+ config = parser.parse_args()\r
+ return config\r
+\r
+if __name__ == "__main__":\r
+ userInput = GetParameters()\r
+ outputPath = userInput.output\r
+ inputFile = userInput.file\r
+ inputDir = userInput.dir\r
+ # Create an output folder.\r
+ print("output dir : " + outputPath)\r
+ if not os.path.exists(outputPath):\r
+ os.mkdir(outputPath)\r
+\r
+ if not os.path.isdir(inputFile) and inputFile[-3:].lower() == "xml":\r
+ print("input file : " + inputFile)\r
+ converter = DialConvertTool()\r
+ converter.convert_xml_to_output(inputFile, outputPath)\r
+\r
+ print("inputdir", inputDir)\r
+ files = os.listdir(inputDir)\r
+ print("input dir : " + inputDir)\r
+ for file in files:\r
+ if not os.path.isdir(file) and file[-3:].lower() == "xml":\r
+ converter = DialConvertTool()\r
+ converter.convert_xml_to_output(inputDir + "/" + file, outputPath)
\ No newline at end of file
--- /dev/null
+中文名:运动\r
+英文名:Sport\r
+标签:经典指针 运动
\ No newline at end of file
--- /dev/null
+中文名:万花筒\r
+英文名:Kaleidoscope\r
+标签:经典指针;动态
\ No newline at end of file
--- /dev/null
+中文名:KUMI\r
+英文名:KUMI\r
+标签:数码表盘
\ No newline at end of file
--- /dev/null
+中文名:N9\r
+英文名:N9\r
+标签:数码表盘
\ No newline at end of file
--- /dev/null
+中文名:水母\r
+英文名:Jellyfish\r
+标签:数码表盘;动物
\ No newline at end of file
--- /dev/null
+中文名:FOOING\r
+英文名:FOOING\r
+标签:数码表盘
\ No newline at end of file
--- /dev/null
+中文名:小狗\r
+英文名:Dog\r
+标签:经典指针;动物
\ No newline at end of file
--- /dev/null
+中文名:小猫\r
+英文名:Kitty\r
+标签:数码表盘;动态;动物
\ No newline at end of file
--- /dev/null
+中文名:指针几何\r
+英文名:Classic_Geometry\r
+标签:经典指针
\ No newline at end of file
--- /dev/null
+中文名:星空\r
+英文名:Galaxy\r
+标签:数码表盘;运动
\ No newline at end of file
--- /dev/null
+中文名:多肉\r
+英文名:Succulents\r
+标签:数码表盘;植物
\ No newline at end of file
--- /dev/null
+中文名:宇航员\r
+英文名:Spaceman\r
+标签:数码表盘;动态;人物
\ No newline at end of file
--- /dev/null
+中文名:卫星\r
+英文名:Satellite\r
+标签:数码表盘;动态
\ No newline at end of file
--- /dev/null
+中文名:飞鸟\r
+英文名:birdie\r
+标签:数码表盘,动物
\ No newline at end of file
--- /dev/null
+中文名:晨曦智影\r
+英文名:Dawn Insight\r
+标签:数码表盘、运动\r
+表盘描述:\r
+“晨曦智影”表盘将科技与生活完美融合,通过简洁的界面展现全天候健康数据。\r
+表盘顶部显示实时天气预报和日期,让你轻松掌握日常安排;\r
+中央大字体时间显示,清晰可读,便于快速查看。\r
+底部区域提供目标步数完成进度、心率、步数和卡路里消耗,智能健康管理一目了然。\r
+此外,表盘还整合了支付宝与AI助手快捷入口,让每一次支付和互动都迅速流畅。\r
+晨曦智影表盘为你带来不仅仅是时间的提示,更是对健康与效率的全面管理。
\ No newline at end of file
--- /dev/null
+中文名:黑曜律动\r
+英文名:Obsidian Rhythm\r
+标签:经典指针、动态表盘\r
+描述:\r
+“黑曜律动”表盘融合现代科技与独特个性,黑色基调搭配精致设计,\r
+彰显你的风格与效率。除了显示时间,它还提供便捷的快捷功能:\r
+● 点击12点位置进入天气应用,查看实时天气信息;\r
+● 点击6点位置查看今日步数,追踪健康数据;\r
+简约优雅的设计,让你在追求效率的同时,保持独一无二的风格。
\ No newline at end of file
--- /dev/null
+中文名:镜影行者\r
+英文名:Mirror Voyager\r
+标签:经典指针、动态表盘\r
+表盘描述:\r
+“镜影行者”表盘将现代时尚与经典腕表元素巧妙融合,\r
+采用三眼设计,左侧子表盘显示实时心率,红色指针与数值提供清晰的健康数据;\r
+右侧子表盘展示步数进展,象征每日目标的达成。\r
+中央计时秒针与外圈渐变的边缘设计则如同时光流逝中的步伐,赋予佩戴者在时间与健康管理中的平衡感。\r
+这款表盘在动感与优雅之间取得完美平衡,是智慧与品味的象征。
\ No newline at end of file
--- /dev/null
+中文名:蓝花\r
+英文名:blue flower\r
+标签:数码表盘;自然植物
\ No newline at end of file
--- /dev/null
+中文名:可爱小鸭\r
+英文名:cute duck\r
+标签:数码表盘;趣味动物
\ No newline at end of file
--- /dev/null
+中文名:经典指针_黑\r
+英文名:classic_black\r
+标签:经典指针
\ No newline at end of file
--- /dev/null
+中文名:万圣南瓜\r
+英文名:pumpkin\r
+标签:数码表盘;节日活动
\ No newline at end of file
--- /dev/null
+中文名:玫瑰\r
+英文名:rose\r
+标签:数码表盘;自然植物
\ No newline at end of file
--- /dev/null
+中文名:白色铃兰花\r
+英文名:valley\r
+标签:数码表盘;自然植物
\ No newline at end of file
--- /dev/null
+中文名:海洋世界\r
+英文名:ocean world\r
+标签:数码表盘;趣味动物
\ No newline at end of file
--- /dev/null
+中文名:森林麋鹿\r
+英文名:forest elk\r
+标签:数码表盘;趣味动物
\ No newline at end of file
--- /dev/null
+中文名:修狗\r
+英文名:puppy\r
+标签:数码表盘;趣味动物
\ No newline at end of file
--- /dev/null
+中文名:花蕾\r
+英文名:bud\r
+标签:数码表盘;自然植物
\ No newline at end of file
--- /dev/null
+中文名:活力数字\r
+英文名:vibrant number\r
+标签:数码表盘;插画艺术
\ No newline at end of file
--- /dev/null
+中文名:炫酷光影\r
+英文名:shadow\r
+标签:经典指针;运动
\ No newline at end of file
--- /dev/null
+中文名:斗鱼\r
+英文名:fighting_fish\r
+标签:数码表盘;趣味动物
\ No newline at end of file
--- /dev/null
+中文名:大鹅\r
+英文名:goose\r
+标签:经典指针;插画艺术;动态
\ No newline at end of file
--- /dev/null
+中文名:露珠\r
+英文名:dewdrop\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:麋鹿\r
+英文名:elk\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:长颈鹿\r
+英文名:giraffe\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:荷花\r
+英文名:lotu\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:老鹰\r
+英文名:eagle\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:斑马\r
+英文名:zebra\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:小雏菊\r
+英文名:little daisy\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:熊\r
+英文名:bear\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:白玫瑰\r
+英文名:white rose\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:夜光水母\r
+英文名:glow jellyfish\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:小翠鸟\r
+英文名:kingfisher\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:大眼雀梅\r
+英文名:ornithogalum\r
+标签:数码表盘;自然植物
\ No newline at end of file
--- /dev/null
+中文名:狮子\r
+英文名:lion\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:沙皮狗\r
+英文名:shar pee\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:水瓶座\r
+英文名:Aquarius\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:射手座\r
+英文名:Sagittarius\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:狮子座\r
+英文名:Leo\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:金牛座\r
+英文名:Taurus\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:白羊座\r
+英文名:Aries\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:天秤座\r
+英文名:Libra\r
+标签:数码表盘;星座\r
--- /dev/null
+中文名:柯基\r
+英文名:corgi\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:仰望\r
+英文名:look up\r
+标签:数码表盘;自然景观\r
--- /dev/null
+中文名:绿叶\r
+英文名:greenery\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:黄昏\r
+英文名:dusk\r
+标签:数码表盘;自然景观\r
--- /dev/null
+中文名:小松鼠\r
+英文名:squirrel\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:蜥蜴\r
+英文名:lizard\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:灯塔\r
+英文名:lighthouse\r
+标签:数码表盘;城市风采\r
--- /dev/null
+中文名:波斯猫\r
+英文名:persian cat\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:都市夜色\r
+英文名:urban night\r
+标签:数码表盘;城市风采\r
--- /dev/null
+中文名:自然\r
+英文名:nature\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:梅花鹿\r
+英文名:sika deer\r
+标签:数码表盘;插画艺术\r
--- /dev/null
+中文名:烟花\r
+英文名:firework\r
+标签:数码表盘;节日活动\r
--- /dev/null
+中文名:粉树\r
+英文名:pink tree\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:湖泊\r
+英文名:lake\r
+标签:数码表盘;自然景观\r
--- /dev/null
+中文名:樱花\r
+英文名:sakura\r
+标签:数码表盘;自然植物\r
--- /dev/null
+中文名:蜗牛\r
+英文名:snails\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:小鸭\r
+英文名:duck\r
+标签:数码表盘;趣味动物\r
--- /dev/null
+中文名:深潜\r
+英文名:deep dive\r
+标签:数码表盘;自然景观\r
--- /dev/null
+中文名:波浪\r
+英文名:wave\r
+标签:数码表盘;插画艺术\r
--- /dev/null
+中文名:机械表盘_足球\r
+英文名:golden ball\r
+标签:经典指针;机械风格\r
--- /dev/null
+中文名:抽象线条\r
+英文名:abstract_lines\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_炫光\r
+英文名:line_glare\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_星球\r
+英文名:line_space\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_液化\r
+英文名:liquefaction\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_螳螂\r
+英文名:line_mantis\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_流动\r
+英文名:line_flow\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_梦境\r
+英文名:line_dream\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_花朵\r
+英文名:line_flower\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_螺旋\r
+英文名:line_spiral\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:爆炸\r
+英文名:explode\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:神经网络\r
+英文名:networks\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:扭曲\r
+英文名:distortion\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:线条_山谷\r
+英文名:line_valley\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:红色小球\r
+英文名:red_bal\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:大卫\r
+英文名:david\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:龙珠\r
+英文名:dragon_ball\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:科幻\r
+英文名:science\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:未来\r
+英文名:future\r
+标签:经典指针、插画艺术\r
--- /dev/null
+中文名:新年快乐\r
+英文名:Happy New Year\r
+标签:数码表盘;节日活动;新年表盘\r
--- /dev/null
+中文名:蛇年大吉\r
+英文名:Snake Year Luck\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:福娃贺岁\r
+英文名:Lucky Doll New\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:恭喜发财\r
+英文名:Wish You Wealth\r
+标签:数码表盘;节日活动;新年表盘\r
--- /dev/null
+中文名:好运连连\r
+英文名:Good Luck Forever\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:八方来财\r
+英文名:Wealth from All\r
+标签:数码表盘;节日活动;新年表盘\r
--- /dev/null
+中文名:喜迎2025\r
+英文名:Welcome 2025\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:元旦快乐\r
+英文名:New Year's Day\r
+标签:数码表盘;节日活动;新年表盘\r
--- /dev/null
+中文名:新春快乐\r
+英文名:Happy Spring\r
+标签:数码表盘;节日活动;新年表盘\r
--- /dev/null
+中文名:2025\r
+英文名:2025\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:蛇来运转\r
+英文名:Luck with Snake\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:蛇年吉祥\r
+英文名:Good Snake Year\r
+标签:数码表盘;新年表盘\r
--- /dev/null
+中文名:灯塔慧\r
+英文名:LighWisdom\r
+标签:数码表盘;\r
--- /dev/null
+中文名:鎏金简约\r
+英文名:Classic Elegance\r
+标签:经典指针
\ No newline at end of file
--- /dev/null
+中文名:动态小鹰\r
+英文名:owl clock\r
+标签:数码表盘;\r
--- /dev/null
+中文名:精简运动\r
+英文名:Essential Sport\r
+标签:经典指针\r
--- /dev/null
+中文名:马年鸿运\r
+英文名:Lucky Steed\r
+标签:数码表盘\r
--- /dev/null
+<dial title="N9" description="N9小猫" size="466 466" version="1.0" preview_img="./instance/1029/N9.png">\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/1029/MAIN_FACE_IMAGE.png"></static_img>\r
+\r
+ <!-- 月份标签 -->\r
+ <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>\r
+ <!-- 日期标签 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>\r
+ <!-- 星期显示 -->\r
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
+ \r
+ <!-- 电池进度条 -->\r
+ <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
+ <!-- 电池图像 -->\r
+ <option_img position="173 52" img_names="./instance/1029/Battery/Battery.png,./instance/1029/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
+ <!-- 电池百分比标签 -->\r
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
+\r
+\r
+ <!-- 小时标签 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->\r
+ <!-- 分钟标签 -->\r
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->\r
+ <!-- 分隔符 -->\r
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->\r
+\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10"></label>\r
+\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title=" FOOING" description=" FOOING" size="466 466" version="1.0" preview_img="./instance/1030/ FOOING.png">\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/1030/MAIN_FACE_IMAGE.png"></static_img>\r
+\r
+\r
+ <!-- 小时和分钟 -->\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="83 318 300 120" text="%s" font_size="90" align="center" bind_data="20483" period="10"></label>\r
+\r
+ <!-- 日期标签 -->\r
+ <label id="dateday_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 90 30" text="%02.0f" font_size="26" align="center" bind_data="16" period="10"></label>\r
+\r
+ <!-- 星期显示 -->\r
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
+ \r
+ \r
+\r
+ <!-- 时间点标签 -->\r
+ <label id="point_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="223 286 200 60" text=":" font_size="60" align="center" bind_data="15" period="10"></label>\r
+</dial>
\ No newline at end of file
--- /dev/null
+\r
+<dial title="satellite" description="卫星" size="466 466" version="1.0" preview_img="./instance/111/satellite.png">\r
+\r
+ <video id="video" rect="0 0 466 466" source="./instance/111/satellite.mp4" color_key="0xff212324" preview_frame="./instance/111/preview_satellite.png"></video>\r
+\r
+ <!-- 月份标签 -->\r
+ <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>\r
+ <!-- 日期标签 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>\r
+ <!-- 星期显示 -->\r
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
+\r
+ <!-- 电池进度条 -->\r
+ <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
+ <!-- 电池图像 -->\r
+ <option_img position="173 52" img_names="./instance/111/Battery/Battery.png,./instance/111/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
+ <!-- 电池百分比标签 -->\r
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
+\r
+\r
+ <!-- 小时标签 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->\r
+ <!-- 分钟标签 -->\r
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->\r
+ <!-- 分隔符 -->\r
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->\r
+\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10"></label>\r
+\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="birdie" description="飞鸟" size="466 466" version="1.0" preview_img="./instance/112/birdie.png">\r
+\r
+ <video id="video" rect="0 0 466 466" source="./instance/112/birdie.mp4" color_key="0xff212324" preview_frame="./instance/112/preview_birdie.png"></video>\r
+\r
+ <!-- 月份标签 -->\r
+ <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>\r
+ <!-- 日期标签 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>\r
+ <!-- 星期显示 -->\r
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>\r
+\r
+ <!-- 电池进度条 -->\r
+ <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
+ <!-- 电池图像 -->\r
+ <option_img position="173 52" img_names="./instance/112/Battery/Battery.png,./instance/112/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
+ <!-- 电池百分比标签 -->\r
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
+\r
+\r
+ <!-- 小时标签 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->\r
+ <!-- 分钟标签 -->\r
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->\r
+ <!-- 分隔符 -->\r
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->\r
+\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10"></label>\r
+\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="dawninsight" description="晨曦智影" size="466 466" version="1.0" preview_img="./instance/113/dawninsight.png">\r
+ <!-- 背景 -->\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/113/MAIN_FACE_IMAGE.png"></static_img>\r
+\r
+ <!-- 天气显示 -->\r
+ <option_img position="165 50" img_names="./instance/113/weather/SUNNY.png,./instance/113/weather/CLEAR_SUNNY.png,./instance/113/weather/SUNNY_CLOUDY.png,./instance/113/weather/CLEAR_CLOUDY.png,./instance/113/weather/OVERCAST.png,./instance/113/weather/RAIN.png,./instance/113/weather/THUNDERSHOWER.png,./instance/113/weather/SNOW.png,./instance/113/weather/FOGGY.png,./instance/113/weather/HAZE.png,./instance/113/weather/DUSTSTORM.png,./instance/113/weather/UNKNOWN.png" bind_data="24" ></option_img>\r
+ <!-- 天气信息显示 -->\r
+ <label id="weather_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="165 70 200 60" text="%s" font_size="30" align="center" bind_data="20482" ></label>\r
+ \r
+ <!-- 日期显示 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="43 128 380 60" text="%s" font_size="30" align="center" bind_data="20484" period="10"></label>\r
+ \r
+ <!-- 步数 -->\r
+ <label id="step_label" color="0xFFaaaaaa" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 413 200 60" text="步数" font_size="20" align="center"></label>\r
+ <!-- 目标步数完成度 -->\r
+ <label id="step_label_goal" color="0xFF666666" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 325 200 60" text="目标步数完成度" font_size="16" align="center"></label>\r
+\r
+ <!-- 心率显示 -->\r
+ <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="30 353 200 60" text="%0.f" font_size="30" align="center" bind_data="2"></label> \r
+ <!-- 步数显示 -->\r
+ <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="133 376 200 60" text="%0.f" font_size="30" align="center" bind_data="1" period="10"></label>\r
+ <!-- 卡路里显示 -->\r
+ <label id="calories_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="240 353 200 60" text="%0.f" font_size="30" align="center" bind_data="3" period="10"></label>\r
+ \r
+ <!-- 小时显示 -->\r
+ <label id="hour_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="86 162 200 60" text="%02.f" font_size="120" align="center" bind_data="15" period="10"></label>\r
+ <!-- 分钟显示 -->\r
+ <label id="minute_label" color="0xFF666666" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="240 162 200 60" text="%02.f" font_size="120" align="center" bind_data="14" period="10"></label>\r
+\r
+ <!-- 电量 -->\r
+ <arc_progress id="battery_progress" rect="0 0 466 436" color="0xFFf0c440" cap_type="round" radius="191" background_color="0xff191919" start_angle="290" end_angle="430" line_width="10" bind_data="33" period="10"></arc_progress>\r
+ <!-- 步数目标 -->\r
+ <box_progress id="stepgoal_progress" rect="103 302 260 12" color="0xFFf0c440" cap_type="round" direction="left_to_right" background_color="0xff191919" bind_data="31" period="10"></box_progress>\r
+\r
+ <!-- 支付宝 -->\r
+ <click rect="20 208 80 80" action_slice="204"></click>\r
+ <!--AI-->\r
+ <click rect="393 208 80 80" action_slice="203"></click>\r
+</dial>\r
--- /dev/null
+<dial title="obsidianrhythm" description="黑曜律动" size="466 466" version="1.0" preview_img="./instance/114/obsidianrhythm.png">\r
+ <!-- 视频背景 -->\r
+ <video id="video" rect="0 0 466 466" source="./instance/114/obsidianrhythm.mp4" color_key="0xff212324" preview_frame="./instance/114/preview_obsidianrhythm.png"></video>\r
+ \r
+ <!-- 动态背景 \r
+ <sequence_img img_names="./instance/114/background/1.png,./instance/114/background/2.png,./instance/114/background/3.png,./instance/114/background/4.png,./instance/114/background/5.png,./instance/114/background/6.png,./instance/114/background/7.png,./instance/114/background/8.png,./instance/114/background/9.png,./instance/114/background/10.png,./instance/114/background/11.png,./instance/114/background/12.png,./instance/114/background/13.png,./instance/114/background/14.png,./instance/114/background/15.png,./instance/114/background/16.png,./instance/114/background/17.png,./instance/114/background/18.png,./instance/114/background/19.png,./instance/114/background/20.png,./instance/114/background/21.png" position="0 0" repeat="true" interval="100"></sequence_img>\r
+ -->\r
+\r
+ <!-- 背景 -->\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/114/MAIN_FACE_IMAGE.png"></static_img>\r
+\r
+ <!-- 天气显示 -->\r
+ <option_img position="201 69" img_names="./instance/114/weather/SUNNY.png,./instance/114/weather/CLEAR_SUNNY.png,./instance/114/weather/SUNNY_CLOUDY.png,./instance/114/weather/CLEAR_CLOUDY.png,./instance/114/weather/OVERCAST.png,./instance/114/weather/RAIN.png,./instance/114/weather/THUNDERSHOWER.png,./instance/114/weather/SNOW.png,./instance/114/weather/FOGGY.png,./instance/114/weather/HAZE.png,./instance/114/weather/DUSTSTORM.png,./instance/114/weather/UNKNOWN.png" bind_data="24" ></option_img>\r
+\r
+ \r
+ <!-- 星期显示 -->\r
+ <option_img position="75 173" img_names="./instance/114/week/WEEK_SUN.png,./instance/114/week/WEEK_MON.png,./instance/114/week/WEEK_TUE.png,./instance/114/week/WEEK_WED.png,./instance/114/week/WEEK_THU.png,./instance/114/week/WEEK_FRI.png,./instance/114/week/WEEK_SAT.png" bind_data="17" period="10"></option_img>\r
+\r
+ <!-- 天气信息显示 -->\r
+ <label id="weather_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="83 130 300 30" text="%s" font_size="20" align="center" bind_data="20482" ></label>\r
+ \r
+ <!-- 日期显示 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="90 222 100 40" text="%0.f" font_size="24" align="center" bind_data="16" period="10"></label>\r
+ \r
+ <!-- 心率显示 -->\r
+ <label id="heart_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="132 348 49 25" text="%0.f" font_size="20" align="center" bind_data="2"></label>\r
+ \r
+ <!-- 步数显示 -->\r
+ <label id="step_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="83 374 300 25" text="%0.f" font_size="20" align="center" bind_data="1" period="10"></label>\r
+ \r
+ <!-- 卡路里显示 -->\r
+ <label id="calories_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="287 348 45 25" text="%0.f" font_size="20" align="center" bind_data="3" period="10"></label>\r
+ \r
+ <!-- 心率icon显示 -->\r
+ <static_img position="144 315" img_name="./instance/114/module/heartrate.png"></static_img>\r
+ <!-- 步数icon显示 -->\r
+ <static_img position="220 341" img_name="./instance/114/module/step.png"></static_img>\r
+ <!-- 卡路里icon显示 -->\r
+ <static_img position="296 315" img_name="./instance/114/module/calories.png"></static_img>\r
+ <!-- 时间背景框icon显示 -->\r
+ <static_img position="300 213" img_name="./instance/114/module/ellipse.png"></static_img>\r
+\r
+\r
+ <!-- 小时显示 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="293 222 77 104" text="%02.f" font_size="20" align="center" bind_data="15" period="10"></label> -->\r
+ <!-- 分号显示 -->\r
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="333 222 28 139" text=":" font_size="20" align="center"></label> -->\r
+ <!-- 分钟显示 -->\r
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="331 222 77 104" text="%02.f" font_size="20" align="center" bind_data="14" period="10"></label> -->\r
+\r
+ \r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis" rect="300 222 100 33" text="%s" font_size="20" align="center" bind_data="20483" period="10"></label>\r
+\r
+ <!-- 小时十位显示-->\r
+ <!-- <label id="hour_ten_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="313 222 64 33" text="%1.0f" font_size="20" align="center" bind_data="26" period="10"></label> -->\r
+ <!-- 小时个位显示 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="323 222 64 33" text="%1.0f" font_size="20" align="center" bind_data="27" period="10"></label> -->\r
+ <!-- 分号显示 -->\r
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="340 220 28 139" text=":" font_size="22" align="center"></label> -->\r
+ <!-- 分钟十位显示 -->\r
+ <!-- <label id="minute_ten_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="355 222 64 33" text="%1.0f" font_size="20" align="center" bind_data="28" period="10"></label> -->\r
+ <!-- 分钟个位显示 -->\r
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="adapt" rect="370 222 64 33" text="%1.0f" font_size="20" align="center" bind_data="29" period="10"></label> -->\r
+\r
+\r
+ <!-- 小时 -->\r
+ <rotate_img id="hour" position="212 75" rotate_center="21.0 158.0" rotate_start="0" rotate_end="360" img_name="./instance/114/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <!-- 分钟 -->\r
+ <rotate_img id="minute" position="218 23" rotate_center="15.0 210.0" rotate_start="0" rotate_end="360" img_name="./instance/114/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <!-- 秒钟 -->\r
+ <rotate_img id="second" position="220 17" rotate_center="13.0 216.0" rotate_start="0" rotate_end="360" img_name="./instance/114/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
+\r
+\r
+ <!--通话\r
+ <click rect="0 193 80 80" action_slice="84"></click>\r
+ -->\r
+ <!--天气-->\r
+ <click rect="193 0 80 80" action_slice="202"></click>\r
+ <!--支付宝\r
+ <click rect="386 193 80 80" action_slice="98"></click>\r
+ -->\r
+ <!--每日活动-->\r
+ <click rect="193 396 80 80" action_slice="201"></click>\r
+</dial>\r
--- /dev/null
+<dial title="mirrorvoyager" description="镜影行者" size="466 466" version="1.0"\r
+ preview_img="./instance/115/mirrorvoyager.png">\r
+ <!-- 背景 -->\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/115/MAIN_FACE_IMAGE.png"></static_img>\r
+\r
+ <!-- 星期显示 -->\r
+ <option_img position="169 279"\r
+ img_names="./instance/115/week/WEEK_SUN.png,./instance/115/week/WEEK_MON.png,./instance/115/week/WEEK_TUE.png,./instance/115/week/WEEK_WED.png,./instance/115/week/WEEK_THU.png,./instance/115/week/WEEK_FRI.png,./instance/115/week/WEEK_SAT.png"\r
+ bind_data="17" period="10"></option_img>\r
+ <!-- 日期显示 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
+ rect="133 325 200 60" text="%0.f" font_size="26" align="center" bind_data="16" period="10"></label>\r
+\r
+ <!-- 心率显示 -->\r
+ <label id="heart_label" color="0xFFe30f0b" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
+ rect="40 185 200 60" text="%0.f" font_size="30" align="center" bind_data="2"></label>\r
+ <!-- 步数显示 -->\r
+ <label id="step_label" color="0xFFe30f0b" font="Audiowide_Regular.ttf" break_mode="ellipsis"\r
+ rect="226 185 200 60" text="%0.f" font_size="20" align="center" bind_data="1" period="10"></label>\r
+\r
+ <!-- 卡路里显示 -->\r
+ <label id="calories_label" color="0xFF000000" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+ break_mode="ellipsis"\r
+ rect="29 340 200 60" text="%0.f" font_size="20" align="center" bind_data="3" period="10"></label>\r
+ <!-- 电量显示 -->\r
+ <label id="battery_label" color="0xFF000000" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+ break_mode="ellipsis" rect="232 340 200 60" text="%s" font_size="20" align="center"\r
+ bind_data="20485" period="10"></label>\r
+\r
+ <!-- 小时 -->\r
+ <rotate_img id="hour" position="212 75" rotate_center="21.0 158.0" rotate_start="0"\r
+ rotate_end="360" img_name="./instance/115/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <!-- 分钟 -->\r
+ <rotate_img id="minute" position="218 23" rotate_center="15.0 210.0" rotate_start="0"\r
+ rotate_end="360" img_name="./instance/115/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <!-- 秒钟 -->\r
+ <rotate_img id="second" position="220 17" rotate_center="13.0 216.0" rotate_start="0"\r
+ rotate_end="360" img_name="./instance/115/SECONDHAND.png" bind_data="12" period="30"></rotate_img>\r
+\r
+ <!-- 秒进度条-->\r
+ <arc_progress id="second_progress" rect="0 0 466 466" color="0xAA191919" cap_type="none"\r
+ radius="233" background_color="0x00FFFFFF" start_angle="0" end_angle="360" line_width="26"\r
+ bind_data="32" period="10"></arc_progress>\r
+\r
+\r
+ <!-- 步数 -->\r
+ <click rect="0 193 80 80" action_slice="201"></click>\r
+ <!-- 心率 -->\r
+ <click rect="386 193 80 80" action_slice="205"></click>\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="LighWisdom" description="灯塔慧" size="466 466" version="1.0" preview_img="./instance/204/LighWisdom.png">
+ <static_img id="back_ground" position="0 0" img_name="./instance/204/MAIN_FACE_IMAGE.png"></static_img>
+
+ <!-- 月份标签 -->
+ <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 390 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>
+ <!-- 日期标签 -->
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 390 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>
+ <!-- 星期显示 -->
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 390 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>
+
+ <!-- 电池进度条 -->
+ <box_progress id="battery_progress" rect="180 58 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>
+ <!-- 电池图像 -->
+ <option_img position="173 52" img_names="./instance/204/Battery/Battery.png,./instance/204/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>
+ <!-- 电池百分比标签 -->
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 52 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>
+
+
+ <!-- 小时标签 -->
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->
+ <!-- 分钟标签 -->
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->
+ <!-- 分隔符 -->
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->
+
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="133 310 200 100" text="%s" font_size="65" align="center" bind_data="20483" period="10"></label>
+
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="classic_elegance" description="鎏金简约" size="466 466" version="2.0" preview_img="./instance/206/classic_elegance.png">\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/206/MAIN_FACE_IMAGE.png"></static_img>\r
+ \r
+ <!-- 时针 -->\r
+ <rotate_img id="hour" position="216 87" rotate_center="17.0 146.0" rotate_start="0" rotate_end="360" img_name="./instance/206/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <!-- 分针 -->\r
+ <rotate_img id="minute" position="211 33" rotate_center="22.0 200.0" rotate_start="0" rotate_end="360" img_name="./instance/206/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <!-- 秒针 -->\r
+ <rotate_img id="second" position="214 28" rotate_center="19.0 205.0" rotate_start="0" rotate_end="360" img_name="./instance/206/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
+\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="owl_clock" description="动态小鹰" size="466 466" version="2.0" preview_img="./instance/207/owl_clock.png" ambient_period="60">\r
+ \r
+ <static_img id="back_ground" position="0 0" img_name="./instance/207/BACKGROUND_6_12.png"></static_img>\r
+ <!-- 时间段背景切换:0-6点、6-12点、12-18点、18-24点 -->\r
+ <!-- 时间段映射:0-5点->0, 6-11点->1, 12-17点->2, 18-23点->3 -->\r
+ <!-- 时间段背景切换(已实现系统端映射逻辑) -->\r
+ <option_img position="0 0" img_names="./instance/207/BACKGROUND_0_6.png,./instance/207/BACKGROUND_6_12.png,./instance/207/BACKGROUND_12_18.png,./instance/207/BACKGROUND_18_24.png" bind_data="37" period="10"></option_img>\r
+ \r
+\r
+ <!-- 月份显示 -->\r
+ <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="186 120 60 30" text="%02.0f-" font_size="36" align="center" bind_data="18" period="10"></label>\r
+ <!-- 日期显示 -->\r
+ <label id="day_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="246 120 60 30" text="%02.0f" font_size="36" align="center" bind_data="16" period="10"></label>\r
+\r
+ <!-- 小时和分钟 -->\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="ellipsis" rect="83 280 300 120" text="%s" font_size="90" align="center" bind_data="20483" period="10"></label>\r
+\r
+ <!-- 电池进度条 -->\r
+ <box_progress id="battery_progress" rect="224 388 30 18" color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="25" period="10"></box_progress>\r
+ <!-- 电池图像 --> \r
+ <option_img position="217 382" img_names="./instance/1052/Battery/Battery.png,./instance/1052/Battery/BatteryCharge.png" bind_data="20" period="10"></option_img>\r
+ <!-- 电池百分比标签 -->\r
+ <!-- <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="228 394 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label> -->\r
+\r
+</dial>\r
--- /dev/null
+<dial title="essential_sport" description="精简运动" size="466 466" version="2.0" preview_img="./instance/208/essential_sport.png">\r
+ <static_img id="back_ground" position="0 0" img_name="./instance/208/MAIN_FACE_IMAGE.png"></static_img>\r
+ \r
+ <static_img id="back_ground" position="0 0" img_name="./instance/208/BACKGROUND_6_12.png"></static_img>\r
+ <!-- 时间段背景切换:0-6点、6-12点、12-18点、18-24点 -->\r
+ <!-- 时间段映射:0-5点->0, 6-11点->1, 12-17点->2, 18-23点->3 -->\r
+ <!-- 时间段背景切换(已实现系统端映射逻辑) -->\r
+ <option_img position="0 0" img_names="./instance/208/BACKGROUND_0_6.png,./instance/208/BACKGROUND_6_12.png,./instance/208/BACKGROUND_12_18.png,./instance/208/BACKGROUND_18_24.png" bind_data="37" period="10"></option_img>\r
+\r
+\r
+ <!-- 时针底部背景 -->\r
+ <static_img id="hand_bottom_bg" position="219 219" img_name="./instance/208/HAND_BOTTOM.png"></static_img>\r
+\r
+ <!-- 时针 (11×66) -->\r
+ <rotate_img id="hour" position="228 167" rotate_center="5.0 66.0" rotate_start="0" rotate_end="360" img_name="./instance/208/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
+ <!-- 分针 (11×130) -->\r
+ <rotate_img id="minute" position="228 103" rotate_center="5.0 130.0" rotate_start="0" rotate_end="360" img_name="./instance/208/MINUTEHAND.png" bind_data="10" period="10"></rotate_img>\r
+ <!-- 秒针 (6×124) -->\r
+ <rotate_img id="second" position="230 128" rotate_center="3.0 105.0" rotate_start="0" rotate_end="360" img_name="./instance/208/SECONDHAND.png" bind_data="12" period="60"></rotate_img>\r
+\r
+ <!-- 时针顶部背景 -->\r
+ <static_img id="hand_top_bg" position="231 228" img_name="./instance/208/HAND_TOP.png"></static_img>\r
+\r
+ <!-- 月/日 -->\r
+ <!-- 日期弧形标签:02/08,贴近表盘外圈左下方 -->\r
+ <arc_label id="date_month_day_arc" center="-30 540" radius="233" start_angle="30" end_angle="359"\r
+ color="0xFF889199" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+ text="%s" font_size="28" align="left"\r
+ bind_data="20488" period="10"></arc_label>\r
+\r
+ <!-- 电量弧形标签:右下方 \"⚡80%\",贴近表盘外圈 -->\r
+ <arc_label id="battery_arc_label" center="515 515" radius="233" start_angle="310" end_angle="359"\r
+ color="0xFF889199" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+ text="%s" font_size="28" align="left"\r
+ bind_data="20485" period="10"></arc_label>\r
+\r
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="LuckySteed" description="马年鸿运" size="466 466" version="2.0" preview_img="./instance/209/LuckySteed.png">
+ <static_img id="back_ground" position="0 0" img_name="./instance/209/MAIN_FACE_IMAGE.png"></static_img>
+
+ <!-- 月份标签 -->
+ <label id="month_label" color="0xFFFFDF96" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="142 149 60 30" text="%02.0f月" font_size="26" align="center" bind_data="18" period="10"></label>
+ <!-- 日期标签 -->
+ <label id="day_label" color="0xFFFFDF96" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="192 149 60 30" text="%02.0f号" font_size="26" align="center" bind_data="16" period="10"></label>
+ <!-- 星期显示 -->
+ <label id="week_label" color="0xFFFFDF96" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="262 149 100 30" text="%s" font_size="26" align="center" bind_data="20480" period="10"></label>
+
+ <!-- 小时标签 -->
+ <!-- <label id="hour_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="152 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="15" period="10"></label> -->
+ <!-- 分钟标签 -->
+ <!-- <label id="minute_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="260 318 200 60" text="%02.0f" font_size="65" align="center" bind_data="14" period="10"></label> -->
+ <!-- 分隔符 -->
+ <!-- <label id="point_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="220 308 50 120" text=":" font_size="75" align="center"></label> -->
+
+ <label id="hour_ten_label" color="0xFFFFDF96" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="83 60 300 100" text="%s" font_size="85" align="center" bind_data="20483" period="10"></label>
+
+</dial>
\ No newline at end of file
--- /dev/null
+<dial title="abyssal_pulse" description="深空脉动" size="466 466" version="2.0" preview_img="./instance/210/abyssal_pulse.png" ambient_period="60">\r
+ \r
+ <static_img id="back_ground" position="0 0" img_name="./instance/210/BACKGROUND_6_12.png"></static_img>\r
+ <!-- 时间段背景切换:0-6点、6-12点、12-18点、18-24点 -->\r
+ <!-- 时间段映射:0-5点->0, 6-11点->1, 12-17点->2, 18-23点->3 -->\r
+ <!-- 时间段背景切换(已实现系统端映射逻辑) -->\r
+ <option_img position="0 0" img_names="./instance/210/BACKGROUND_0_6.png,./instance/210/BACKGROUND_6_12.png,./instance/210/BACKGROUND_12_18.png,./instance/210/BACKGROUND_18_24.png" bind_data="37" period="10"></option_img>\r
+ \r
+ <!-- 小时和分钟 -->\r
+ <label id="hour_ten_label" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="ellipsis" rect="83 170 300 120" text="%s" font_size="80" align="center" bind_data="20483" period="10"></label>\r
+ \r
+ <label id="date_month_day" color="0xFFFFFFFF" font="Gilroy_Bold.ttf" break_mode="adapt" rect="186 260 60 30" text="%s" font_size="36" align="center" bind_data="20488" period="10"></label>\r
+\r
+\r
+</dial>\r
--- /dev/null
+<dial title="two_tone_art" description="双色艺术" size="466 466" version="2.0" preview_img="./instance/211/two_tone_art.png" ambient_period="60">\r
+ \r
+ <static_img id="back_ground" position="0 0" img_name="./instance/211/BACKGROUND_6_12.png"></static_img>\r
+ <!-- 时间段背景切换:0-6点、6-12点、12-18点、18-24点 -->\r
+ <!-- 时间段映射:0-5点->0, 6-11点->1, 12-17点->2, 18-23点->3 -->\r
+ <!-- 时间段背景切换(已实现系统端映射逻辑) -->\r
+ <option_img position="0 0" img_names="./instance/211/BACKGROUND_0_6.png,./instance/211/BACKGROUND_6_12.png,./instance/211/BACKGROUND_12_18.png,./instance/211/BACKGROUND_18_24.png" bind_data="37" period="10"></option_img>\r
+ \r
+ <!-- 电量 -->\r
+ <arc_progress id="battery_progress" rect="0 20 466 466" color="0xFF74EE21" cap_type="round" radius="230" background_color="0xff191919" start_angle="316" end_angle="404" line_width="10" bind_data="33" period="10"></arc_progress>\r
+\r
+ <option_img position="223 10" img_names="./instance/211/Battery_0_6.png,./instance/211/Battery_6_12.png,./instance/211/Battery_12_18.png,./instance/211/Battery_18_24.png" bind_data="37" period="10"></option_img>\r
+\r
+ <!-- 电池百分比标签 -->\r
+ <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="215 40 200 62" text="%s" font_size="26" align="center" bind_data="20485" period="10"></label>\r
+\r
+ <!-- 月/日 -->\r
+ <label id="date_month_day" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="158 400 60 30" text="%s" font_size="30" align="center" bind_data="20488" period="10"></label>\r
+\r
+ <!-- 星期显示 -->\r
+ <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf" break_mode="adapt" rect="240 400 100 30" text="%s" font_size="30" align="center" bind_data="20480" period="10"></label>\r
+\r
+</dial>\r
--- /dev/null
+LZMA SDK 21.07
+--------------
+
+UNIX/Linux version
+------------------
+To compile C++ version of file->file LZMA encoding, go to directory
+CPP/7zip/Bundles/LzmaCon
+and call make to recompile it:
+ make -f makefile.gcc clean all
--- /dev/null
+#!/bin/bash
+###
+# @Date: 2024-06-07 09:44:50
+# @LastEditors: Caisking 3449750381@qq.com
+# @LastEditTime: 2024-08-30 15:00:54
+# @FilePath: /FD230/tools/dial_converter_tool/make_tools/gen_dial_bin.sh
+###
+
+# 定义颜色常量,用于彩色输出
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+YELLOW='\033[0;33m'
+NC='\033[0m'
+
+# 返回上一级目录
+cd .. || { echo -e "${RED}Error: Failed to change directory.${NC}"; exit 1; }
+
+# 检查并创建 out 和 dial_lzma 目录
+mkdir -p out dial_lzma || { echo -e "${RED}Error: Failed to create directories.${NC}"; exit 1; }
+
+# 定义 main.py 的路径
+MAIN_PY_PATH="dial_converter_tool/main.py"
+
+# 检查 main.py 文件是否存在
+if [ ! -f "$MAIN_PY_PATH" ]; then
+ echo -e "${RED}Error: main.py not found at $MAIN_PY_PATH.${NC}"
+ exit 1
+fi
+
+# 检查参数数量
+case $# in
+ 0)
+ # 没有参数,制作所有表盘
+ subdirs=(instance/*/)
+ ;;
+ 1)
+ # 一个参数,制作单个表盘
+ subdirs=("instance/${1#instance/}")
+ if [ ! -d "${subdirs[0]}" ]; then
+ echo -e "${RED}Error: Specified directory '${subdirs[0]}' does not exist.${NC}"
+ exit 1
+ fi
+ ;;
+ 2)
+ # 两个参数,制作指定范围的表盘
+ start_dir=$(basename "$1")
+ end_dir=$(basename "$2")
+ subdirs=()
+ for dir in instance/*/; do
+ dir_name=$(basename "$dir")
+ if [[ "$dir_name" =~ ^[0-9]+$ ]] && [ "$dir_name" -gt "$start_dir" ] && [ "$dir_name" -lt "$end_dir" ]; then
+ subdirs+=("$dir")
+ fi
+ done
+ if [ ${#subdirs[@]} -eq 0 ]; then
+ echo -e "${RED}Error: No directories found in the specified range.${NC}"
+ exit 1
+ fi
+ ;;
+ *)
+ # 参数数量超过2个,输出使用说明并退出
+ echo -e "${YELLOW}Usage: $0 [dial_folder] or $0 [start_dir] [end_dir]${NC}"
+ exit 1
+ ;;
+esac
+
+# 获取脚本所在目录
+# SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
+# LZMA_TOOL_PATH="$SCRIPT_DIR/../lzma_tool/lzma_tool"
+
+# 遍历子目录处理表盘
+for subdir in "${subdirs[@]}"; do
+ # 提取子目录名称
+ dial=$(basename "$subdir")
+
+ # 查找子目录中的 XML 文件
+ xml_file=$(find "$subdir" -maxdepth 1 -type f -name "*.xml" -print -quit)
+ if [ -z "$xml_file" ]; then
+ echo -e "${RED}Error: XML file not found in $subdir${NC}"
+ continue
+ fi
+
+ # 计算文件数量和大小
+ dialfilecount=$(find "$subdir" -maxdepth 1 -type f | wc -l)
+ dialfilesize=$(du -sh "$subdir" | awk '{print $1}')
+
+ # 输出统计信息
+ echo -e "${YELLOW}Processing $dial [$dialfilecount files, $dialfilesize size]${NC}"
+
+ # 调用 main.py 处理子目录中的文件
+ if ! python "$MAIN_PY_PATH" -dir "$subdir" -output out/; then
+ echo -e "${RED}Error processing directory $dial${NC}"
+ continue
+ fi
+
+ # 压缩 .bin 文件到 .lzma 文件
+ bin_file="out/${xml_file##*/}"
+ bin_file="${bin_file%.xml}.bin"
+ lzma_file="dial_lzma/$dial/${xml_file##*/}"
+ lzma_file="${lzma_file%.xml}.lzma"
+
+
+ # 创建必要的目录
+ mkdir -p "$(dirname "$lzma_file")"
+
+ # 调用 lzma_tool(当前目录在dial)
+ if ! ./lzma_tool/lzma_tool -d12 -lc0 -lp0 e "$bin_file" "$lzma_file"; then
+ echo -e "${RED}lzma_tool directory $dial error${NC}"
+ else
+ echo -e "${GREEN}lzma_tool directory $dial ok${NC}"
+ fi
+done
\ No newline at end of file
--- /dev/null
+## 在liunx环境运行表盘脚本\r
+\r
+# 1.下载对应模块\r
+\r
+pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Pillow\r
+\r
+pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python\r
+\r
+pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib\r
+\r
+## 2.对表盘工具进行赋权限\r
+\r
+chmod +x gen_dial_bin.sh\r
+./gen_dial_bin.sh\r
+\r
+## 3.制作运行单个表盘\r
+\r
+python ./main.py -dir ./instance/1028/ -output ./out/\r
+\r
+#使用lzma_tool工具需要赋权限\r
+ chmod +x ../lzma_tool/lzma_tool\r
+\r
+### 更新版本 0830\r
+\r
+- 制作单个表盘以及lzma文件 **./gen_dial_bin.sh + 表盘文件夹路径**\r
+\r
+ ```\r
+ 示例 ./gen_dial_bin.sh ../instance/114/\r
+ ```\r
+- 制作所有的表盘以及lzma文件\r
+\r
+ ```\r
+ ./gen_dial_bin.sh\r
+ ```\r
+\r
+\r
+\r
+### 更新版本0110\r
+\r
+制作指定段表盘 : start ->end 根据表盘Id 进行依次制作表盘\r
+\r
+```c\r
+ 示例 ./gen_dial_bin.sh ../instance/114/ ../instance/124/ \r
+```\r
+\r
+- 效果会生成 114->124 一共11个表盘\r