原文地址:SCH_PrimitiveText.create() method | 嘉立创EDA专业版用户指南

本文为示例


  // 创建文本的参数

  const x = 100; // 文本的X坐标

  const y = 100; // 文本的Y坐标

  const content = 'Hello, World!'; // 文本内容


  // 可选参数,可以根据需要设置

  const rotation = 0; // 文本的旋转角度

  const textColor = '#FF11FF'; // 文本颜色,这里设置为黑色

  const fontName = 'Arial'; // 字体名称,这里设置为Arial

  const fontSize = 12; // 字体大小

  const bold = false; // 是否加粗

  const italic = false; // 是否斜体

  const underLine = false; // 是否下划线

  const alignMode = 0; // 对齐模式,0 左顶,1 中顶,2 右顶,3 左中,4 中中,5 右中,6 左底,7 中底,8 右底


  // 调用API创建文本

  const textPrimitive = eda.sch_PrimitiveText.create(x, y, content, rotation, textColor, fontName, fontSize, bold, italic, underLine, alignMode);


#嘉立创EDA#

#扩展API#

#狼黑电子#

#嘉立创EDA#
#扩展API#
#狼黑电子#

还没有评论,抢个沙发!