mirror of
https://github.com/tenox7/wrp.git
synced 2025-01-17 22:29:53 +00:00
scale area map too
This commit is contained in:
parent
5d8f51ac66
commit
ebe19912e6
@ -14,7 +14,6 @@ A HTTP proxy server that allows to use historical and obsolete web browsers on t
|
|||||||
* resolve relative links
|
* resolve relative links
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
* configurable size and scale
|
|
||||||
* ISMAP
|
* ISMAP
|
||||||
* unexpected EOF on Windows
|
* unexpected EOF on Windows
|
||||||
* configurable color palete and quantization
|
* configurable color palete and quantization
|
||||||
|
4
wrp.go
4
wrp.go
@ -143,7 +143,7 @@ func capture(gourl string, w int64, h int64, s float64, out http.ResponseWriter)
|
|||||||
|
|
||||||
if len(b.Content) > 6 && len(target) > 7 {
|
if len(b.Content) > 6 && len(target) > 7 {
|
||||||
fmt.Fprintf(out, "<AREA SHAPE=\"RECT\" COORDS=\"%.f,%.f,%.f,%.f\" ALT=\"%s\" TITLE=\"%s\" HREF=\"%s\">\n",
|
fmt.Fprintf(out, "<AREA SHAPE=\"RECT\" COORDS=\"%.f,%.f,%.f,%.f\" ALT=\"%s\" TITLE=\"%s\" HREF=\"%s\">\n",
|
||||||
b.Content[0], b.Content[1], b.Content[4], b.Content[5], n.AttributeValue("href"), n.AttributeValue("href"), target)
|
b.Content[0]*s, b.Content[1]*s, b.Content[4]*s, b.Content[5]*s, n.AttributeValue("href"), n.AttributeValue("href"), target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +163,6 @@ func main() {
|
|||||||
http.HandleFunc("/img/", imgServer)
|
http.HandleFunc("/img/", imgServer)
|
||||||
http.HandleFunc("/favicon.ico", http.NotFound)
|
http.HandleFunc("/favicon.ico", http.NotFound)
|
||||||
http.HandleFunc("/halt", haltServer)
|
http.HandleFunc("/halt", haltServer)
|
||||||
log.Printf("Starting http server on %s\n", addr)
|
log.Printf("Starting WRP http server on %s\n", addr)
|
||||||
http.ListenAndServe(addr, nil)
|
http.ListenAndServe(addr, nil)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user