Skip to main content

Таблица DocumentAPI.LineProperties

Таблица DocumentAPI.LineProperties предназначена для установки таких параметров линии, как тип, ширина, цвет (см. Рисунок).

ПолеТипОписание
LineProperties.styleLineStyleТип линии
LineProperties.widthnumberТолщина линии
LineProperties.colorColorЦвет линии
LineProperties.headLineEndingPropertiesLineEndingPropertiesТип начала линии
LineProperties.tailLineEndingPropertiesLineEndingPropertiesТип окончания линии

Пример​


local table = document:getBlocks():getTable(0)
local cell = table:getCell("C3")

lineProperties = DocumentAPI.LineProperties()
lineProperties.style = DocumentAPI.LineStyle_Solid
lineProperties.width = 1.5
lineProperties.color = DocumentAPI.Color(DocumentAPI.ColorRGBA(55, 146, 179, 200))

borders = DocumentAPI.Borders()
borders = borders:setTop(lineProperties)
local brds = cell:setBorders(borders)