<<< Date Index >>>     <<< Thread Index >>>

Re: w3mimgdisplay use?



* Kyle Wheeler [09.Kas.07 17:59 -0600]:
>      n -> ?

This is used when displaying multiple images on a terminal window, and 
holds the index of the images in the cache.

>      x -> x coordinate to draw the image at (top left corner)
>      y -> y coordinate to draw the image at (top left corner)

Correct.

>      w -> width to draw the image
>      h -> height to draw the image

These are the width/height of the original image to draw.

>      sx -> ???
>      xy -> ???
>      sw -> width of the original (source) image
>      sh -> height of the original (source) image

These parameters are for the actual image drawn on the window. Probably 
's' stands for 'seen' or 'shown'. 'sx' and 'sy' are offsets from 'x' and 
'y' respectively.

> After playing around, I figured out that sx and sy allow you to crop 
> off parts of the top and left of the image... like it means "start 
> drawing from sx and sy in the image", which makes some sense.

Yes, w3m uses these to redraw partly drawn images from cache when 
scrolling.

> I still can't figure out what n means, though. ...perhaps it has 
> something to do with animated gifs?

Animation frames are also drawn as separate images, so yes.

But if you need to tweak these n and s parameters, I'd suggest calling  
w3m directly and letting it handle the details.

-- 
~sertaç