imagemap

package
v0.0.0-...-c13b88d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	Href string `json:"href"`
	Alt  string `json:"alt,omitempty"`
	Min  Point  `json:"min"`
	Max  Point  `json:"max"`
}

type Content

type Content struct {
	Image string `json:"image"` // in base64
	Areas []Area `json:"areas"`
	Size  Point  `json:"size"`
}

func FromXML

func FromXML(mime string, data []byte, areas []XMLArea) (content *Content, err error)

type Point

type Point struct {
	X int `json:"x"`
	Y int `json:"y"`
}

type XML

type XML struct {
	Image struct {
		Href string `xml:"href,attr"`
	} `xml:"image"`
	Area []XMLArea `xml:"area"`
}

type XMLArea

type XMLArea struct {
	Shape  string `xml:"shape"`
	Coords string `xml:"coords"`
	XRef   struct {
		Href string `xml:"href,attr"`
		Alt  string `xml:",chardata"`
	} `xml:"xref"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL