Skip to content

Commit

Permalink
ref: ApiStroke.ToJSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Yar04ek committed Dec 12, 2023
1 parent 5f9900f commit d3896b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/docx/smoke/api_stroke/to_json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ builder.CreateFile("docx");
let oDocument = Api.GetDocument();
let oParagraph = oDocument.GetElement(0);
let oRGBColor = Api.CreateRGBColor(255, 111, 61);
let oFill = Api.CreateSolidFill(oRGBColor);
let oStroke = Api.CreateStroke(5 * 36000, Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51)));
let jsonStroke = oStroke.ToJSON();
oParagraph.AddText(jsonStroke);
Expand All @@ -20,8 +19,8 @@ builder.CreateFile("docx");
oDocument.Push(oParagraph1);
let oParagraph2 = Api.CreateParagraph();
let oRGBColor2 = Api.CreateRGBColor(255, 213, 191);
let oFill2 = Api.CreateSolidFill(oRGBColor2);
let oDrawing = Api.CreateShape("roundRect", 5930900, 395605, oFill2, oStrokeFromJSON);
let oFill = Api.CreateSolidFill(oRGBColor2);
let oDrawing = Api.CreateShape("roundRect", 5930900, 395605, oFill, oStrokeFromJSON);
let jsonDrawing = oDrawing.ToJSON(false, true);
oParagraph2.AddText(jsonDrawing);
oDocument.Push(oParagraph2);
Expand Down

0 comments on commit d3896b9

Please sign in to comment.