Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct { Red float64 `json:"r"` Green float64 `json:"g"` Blue float64 `json:"b"` Alpha float64 `json:"a"` }
func (*Color) UnmarshalJSON ¶
type FactorioIcon ¶
type RenderIcon ¶
func NewRenderIcon ¶
func NewRenderIcon(factorioIcon FactorioIcon, scaleBase ScaleBase, sizeToRender int) RenderIcon
NewRenderIcon transforms the provided Factorio icon into the structure required by the actual renderer, adjusting the sizes etc. of the layers to match what Factorio would actually render. The scaleBase is the size of the icon on which the scale values are based. If an item or recipe icon is rendered, the scaleBase must be 32. For all other types of icons, 0 must be passed so that scaling is based on the first layer. The sizeToRender is the size the final image should have. The renderer will scale the rendered icon accordingly.
type ScaleBase ¶ added in v1.0.2
type ScaleBase uint
const ( // ScaleBaseDefault is the scale base used for most of the icons. The first layer of the icon will set the scale. ScaleBaseDefault ScaleBase = 0 // ScaleBaseItemOrRecipe is the scale base used for item and recipe icons. The scale is always based on 32px. ScaleBaseItemOrRecipe ScaleBase = 32 )
Click to show internal directories.
Click to hide internal directories.