Dear author, I would like to ask you how to add a text object or label to a gds file in lib using write_gds in gdstk.A polygon that is not a text.The following is the code I created in the gdstk document to create a gds file.
`
include "mainwindow.h"
include
include
include
include
include
include "ui_mainwindow.h"
include <gdstk/gdstk.hpp>
include
using namespace gdstk; // 使用GDSTK库的命名空间
// 定义一个函数,生成一个包含一系列矩形的单元(Cell)
Cell grating(double period, double fill_frac, double length, double width, Tag tag, const char name)
{
double x = width / 2; // 计算矩形的x坐标
double w = period * fill_frac; // 计算矩形的宽度
int64_t num = (int64_t) (length / period); // 计算需要生成的矩形的数量
Dear author, I would like to ask you how to add a text object or label to a gds file in lib using write_gds in gdstk.A polygon that is not a text.The following is the code I created in the gdstk document to create a gds file. `
include "mainwindow.h"
include
include
include
include
include
include "ui_mainwindow.h"
include <gdstk/gdstk.hpp>
include
using namespace gdstk; // 使用GDSTK库的命名空间
// 定义一个函数,生成一个包含一系列矩形的单元(Cell) Cell grating(double period, double fill_frac, double length, double width, Tag tag, const char name) { double x = width / 2; // 计算矩形的x坐标 double w = period * fill_frac; // 计算矩形的宽度 int64_t num = (int64_t) (length / period); // 计算需要生成的矩形的数量
}
// 主窗口的构造函数 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) // 调用基类的构造函数 , ui(new Ui::MainWindow) // 创建用户界面 { ui->setupUi(this); // 设置用户界面
}
// 主窗口的析构函数 MainWindow::~MainWindow() { delete ui; // 删除用户界面 } ` I want to write a label or text object in the GDS file, like this![1](https://github.com/heitzmann/gdstk/assets/95074184/f3da6940-bc9a-40e1-a0fc-ff895dabcd9e)