Skip to content

Commit

Permalink
Update docs for the function AddShape (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnmlgbgithub authored Jul 23, 2023
1 parent e3ebfda commit a5156e6
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 20 deletions.
5 changes: 3 additions & 2 deletions ar/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## أضف الشكل

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

يوفر AddShape طريقة لإضافة شكل في ورقة من خلال فهرس ورقة عمل معين ومجموعة تنسيق الشكل (مثل الإزاحة والقياس وإعدادات نسبة العرض إلى الارتفاع وإعدادات الطباعة) ومجموعة الخصائص. على سبيل المثال ، أضف مربع نص (شكل مستطيل) في "Sheet1":

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions de/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## Form hinzufügen

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape bietet die Methode zum Hinzufügen einer Form zu einem Blatt anhand des angegebenen Arbeitsblattindex, des festgelegten Formformats (z. B. Versatz, Skalierung, Einstellung des Seitenverhältnisses und Druckeinstellungen) und der festgelegten Eigenschaften. Fügen Sie beispielsweise ein Textfeld (Rechteckform) in "Sheet1" hinzu:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions en/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## Add Shape

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape provides the method to add shape in a sheet by given worksheet index, shape format set (such as offset, scale, aspect ratio setting and print settings) and properties set. For example, add text box (rect shape) in `Sheet1`:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions es/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## Agregar forma

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape proporciona el método para agregar forma en una hoja mediante un índice de hoja de trabajo determinado, un conjunto de formato de forma (como desplazamiento, escala, configuración de relación de aspecto y configuración de impresión) y conjunto de propiedades. Por ejemplo, agregue un cuadro de texto (forma rectangular) en `Sheet1`:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions fr/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## Ajouter une forme

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape fournit la méthode permettant d'ajouter une forme dans une feuille en fonction d'un index de feuille de calcul donné, d'un ensemble de formats de forme (tels que décalage, échelle, paramètres de format et paramètres d'impression) et de propriétés. Par exemple, ajoutez une zone de texte (forme rectale) dans `Sheet1`:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions ja/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## 図形を追加する

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

指定したワークシート名、セル座標、およびスタイル (オフセット、ズーム、伸縮、縦横比、印刷プロパティなど) に基づいて、特定のセルに図形を追加します。たとえば、`Sheet1` という名前のワークシートにテキストボックス (四角形) を追加します:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions ko/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## 셰이프 추가

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape는 지정된 워크시트 인덱스, 모양 형식 집합(예: 간격띄우기, 축척, 종횡비 설정 및 인쇄 설정) 및 속성 집합을 사용하여 시트에 셰이프를 추가하는 방법을 제공합니다. 예를 들어 `Sheet1` 에 텍스트 상자 (직사각형 모양) 를 추가합니다:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions ru/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## Добавить форму

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

AddShape предоставляет метод добавления фигуры на листе с помощью заданного индекса рабочего листа, формата формы (например, смещения, масштаба, настройки соотношения сторон и параметров печати) и свойств. Например, добавьте текстовое поле (прямая форма) в `Sheet1`:

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions zh-hans/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## 添加形状

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

根据给定的工作表名、单元格坐标和样式(包括偏移、缩放、拉伸、宽高比和打印属性等)在指定单元格添加形状。例如,在名为 `Sheet1` 的工作表上添加文本框(矩形):

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down
5 changes: 3 additions & 2 deletions zh-tw/shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
## 添加圖形

```go
func (f *File) AddShape(sheet, cell string, opts *Shape) error
func (f *File) AddShape(sheet string, opts *Shape) error
```

根據給定的工作表名、儲存格坐標和樣式(包括偏移、縮放、拉伸、寬高比和列印屬性等)在指定儲存格添加圖形。例如,在名為 `Sheet1` 的工作表上添加文本框(矩形):

```go
lineWidth := 1.2
err := f.AddShape("Sheet1", "G6",
err := f.AddShape("Sheet1",
&excelize.Shape{
Cell: "G6",
Type: "rect",
Line: excelize.ShapeLine{Color: "4286F4", Width: &lineWidth},
Fill: excelize.Fill{Color: []string{"8EB9FF"}},
Expand Down

0 comments on commit a5156e6

Please sign in to comment.