Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseHexToRGBA ¶
ParseHexToRGBA converts a hexadecimal color string to an RGBA color. The color string should be in the format "#RRGGBB" or "#RGB". Returns the corresponding color.RGBA struct and an error if the format is invalid.
func ParseRGBAToHex ¶
ParseRGBAToHex converts an RGBA color to a hexadecimal color string. Returns the corresponding hexadecimal color string.
Types ¶
type Color ¶
type Color struct {
Hex string // Hexadecimal representation of the color.
RGBA color.RGBA // RGBA representation of the color.
}
Color represents a color with both hexadecimal and RGBA representations.
type Doodle ¶
type Doodle struct {
Arabic bool // Indicates whether the text is Arabic or not.
Text string // The text to be drawn.
Dst draw.Image // The destination image onto which the text will be drawn.
Src image.Image // The source image from which the text color will be picked.
Face font.Face // The font face used for rendering the text.
X, Y int // The coordinates where the text will be drawn.
}
Doodle represents a text doodle that can be drawn onto an image.
type Font ¶
type Font struct {
Face font.Face // Face represents the font face that can be used for rendering text.
Path string // Path is the file path to the font file.
Size uint64 // Size is the font size.
DPI uint64 // DPI is the dots per inch (resolution) of the font.
}
Font represents a font file and its properties.
type Image ¶
type Image struct {
Path string // Path is the file path of the image.
Data draw.Image // Data is the image data in draw.Image format.
Format string // Format is the format of the image (e.g., "jpeg" or "png").
ImageBytes []byte // ImageBytes is the byte slice representing the image.
}
Image represents an image with associated data and format.
Click to show internal directories.
Click to hide internal directories.