package colorlight

type LogFont struct {
	LfHeight    string `json:"lfHeight"`    //Font height in pixels.
	LfWeight    string `json:"lfWeight"`    // 0-1000， 0，Default weight, 700 bold
	LfItalic    string `json:"lfItalic"`    //Italic 0-not italic, 1-italic
	LfUnderline string `json:"lfUnderline"` //underline or not.
	LfStrikeOut string `json:"lfStrikeOut"` //
	LfFaceName  string `json:"lfFaceName"`  //font name. "default" for english.
}

// 单行文本
type ItemSingleLineText struct {
	Type              string  `json:"Type"`      //(DONT change this, 4 – is for single line text item)
	TextColor         string  `json:"TextColor"` // e.g. 0xFF000000
	LogFont           LogFont `json:"LogFont"`
	Text              string  `json:"Text"`              //Text content
	IsScroll          string  `json:"IsScroll"`          //Should the text scroll or not (0-not scroll, 1-scroll)
	Speed             string  `json:"Speed"`             //pixels per second
	IsScrollByTime    string  `json:"IsScrollByTime"`    // 0-use RepeatCount, 1-use PlayLenth
	IsHeadConnectTail string  `json:"IsHeadConnectTail"` //"0|1",
	RepeatCount       string  `json:"RepeatCount"`       //
	PlayLenth         string  `json:"PlayLenth"`         //Duration (miliseconds)
}

// 多行文本
type ItemMultiLineText struct {
	Type           string  `json:"Type"`      //(DONT change this id, 5-multiline)
	TextColor      string  `json:"TextColor"` // e.g. 0xFF000000
	LogFont        LogFont `json:"LogFont"`
	CenteralAlign  string  `json:"CenteralAlign"`  // Horizontal alignment, 0 – Left alignment, 1 – Center Alignment, 2 – Right alignment.
	VerticalAlign  string  `json:"VerticalAlign"`  // Vertical alignment, 0 – Top alignment, 1 – Center Alignment
	Text           string  `json:"Text"`           //Text content
	IsScroll       string  `json:"IsScroll"`       //Should the text scroll or not (0-not scroll, 1-scroll)
	Speed          string  `json:"Speed"`          //pixels per second
	IsScrollByTime string  `json:"IsScrollByTime"` // 0-use RepeatCount, 1-use PlayLenth
	RepeatCount    string  `json:"RepeatCount"`    //
	PlayLenth      string  `json:"PlayLenth"`      //Duration (miliseconds)
}

type InEffect struct {
	Type string `json:"Type"`
	Time string `json:"DateTime"` // Transition duration in milisecond.
}

// 图片
type ItemPicture struct {
	Type       string     `json:"Type"` // (DONT change this, 2-Picture item)
	FileSource FileSource `json:"FileSource"`
	Duration   string     `json:"Duration"` // Duration in millisecond, including the inEffect->DateTime.
	InEffect   InEffect   `json:"inEffect"`
	ReserveAS  string     `json:"ReserveAS"` //Keep image aspect ratio.
}

// 视频
type ItemVideo struct {
	Type       string     `json:"Type"`     // (DONT change this id. Fixed, 3 – this item is video)
	Volume     string     `json:"Volume"`   // Volume（0-1.000000） (* Mandatory)
	Duration   string     `json:"Duration"` // Duration in millisecond
	FileSource FileSource `json:"FileSource"`
	ReserveAS  string     `json:"ReserveAS"` //Keep image aspect ratio.
}

// 网页
type ItemWebPage struct {
	Type string `json:"Type"` // (DONT change this, 27-WEB page item)
	Url  string `json:"Url"`  //
	Rect Rect   `json:"Rect"` // Duration in millisecond
}
