aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-11-29 14:53:29 +0000
committerDave Love2000-11-29 14:53:29 +0000
commit62fb5c6645a442dfcc5a32aee9f047e0814fe489 (patch)
tree9f1d3b1b8b1921432e3ee45dee012c56c43f1b2d
parent4a967a9b436dce9a090c38c40d9c7c7712512449 (diff)
downloademacs-62fb5c6645a442dfcc5a32aee9f047e0814fe489.tar.gz
emacs-62fb5c6645a442dfcc5a32aee9f047e0814fe489.zip
image-mask-p
keymap property image property changes
-rw-r--r--lispref/display.texi112
1 files changed, 96 insertions, 16 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index ddec9219648..12be0ef10dd 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -928,6 +928,12 @@ if it ever becomes empty (i.e., if it spans no characters).
928If this property is non-@code{nil}, it specifies a keymap for a portion 928If this property is non-@code{nil}, it specifies a keymap for a portion
929of the text. The property's value replaces the buffer's local map, when 929of the text. The property's value replaces the buffer's local map, when
930the character after point is within the overlay. @xref{Active Keymaps}. 930the character after point is within the overlay. @xref{Active Keymaps}.
931
932@item keymap
933@kindex keymap @r{(overlay property)}
934The @code{keymap} property is similar to @code{local-map} but overrides the
935buffer's local map (and the map specified by the @code{local-map}
936property) rather than replacing it.
931@end table 937@end table
932 938
933@node Managing Overlays 939@node Managing Overlays
@@ -2477,25 +2483,92 @@ The @code{:algorithm} property, if non-@code{nil}, specifies a
2477conversion algorithm that should be applied to the image before it is 2483conversion algorithm that should be applied to the image before it is
2478displayed; the value, @var{algorithm}, specifies which algorithm. 2484displayed; the value, @var{algorithm}, specifies which algorithm.
2479 2485
2480Currently, the only meaningful value for @var{algorithm} (aside from 2486@table @code
2481@code{nil}) is @code{laplace}; this applies the Laplace edge detection 2487@item laplace
2482algorithm, which blurs out small differences in color while highlighting 2488@itemx emboss
2483larger differences. People sometimes consider this useful for 2489Specifies the Laplace edge detection algorithm, which blurs out small
2484displaying the image for a ``disabled'' button. 2490differences in color while highlighting larger differences. People
2491sometimes consider this useful for displaying the image for a
2492``disabled'' button.
2493
2494@item (edge-detection :matrix @var{matrix} :color-adjust @var{adjust})
2495Specifies a general edge-detection algorithm. @var{matrix} must be
2496either a nine-element list or a nine-element vector of numbers. A pixel
2497at position @math{x/y} in the transformed image is computed from
2498original pixels around that position. @var{matrix} specifies, for each
2499pixel in the neighborhood of @math{x/y}, a factor with which that pixel
2500will influence the transformed pixel; element @math{0} specifies the
2501factor for the pixel at @math{x-1/y-1}, element @math{1} the factor for
2502the pixel at @math{x/y-1} etc., as shown below:
2503@iftex
2504@tex
2505$$\pmatrix{x-1/y-1 & x/y-1 & x+1/y-1 \cr
2506 x-1/y & x/y & x+1/y \cr
2507 x-1/y+1& x/y+1 & x+1/y+1 \cr}$$
2508@end tex
2509@end iftex
2510@ifnottex
2511@display
2512 (x-1/y-1 x/y-1 x+1/y-1
2513 x-1/y x/y x+1/y
2514 x-1/y+1 x/y+1 x+1/y+1)
2515@end display
2516@end ifnottex
2485 2517
2486@item :heuristic-mask @var{transparent-color} 2518The resulting pixel is computed from the color intensity of the color
2487The @code{:heuristic-mask} property, if non-@code{nil}, specifies that a 2519resulting from summing up the RGB values of surrounding pixels,
2488certain color in the image should be transparent. Each pixel where this 2520multiplied by the specified factors, and dividing that sum by the sum
2489color appears will actually allow the frame's background to show 2521of the factors' absolute values.
2490through.
2491 2522
2492If @var{transparent-color} is @code{t}, then determine the transparent 2523Laplace edge-detection currently uses a matrix of
2493color by looking at the four corners of the image. This uses the color 2524@iftex
2494that occurs most frequently near the corners as the transparent color. 2525@tex
2526$$\pmatrix{1 & 0 & 0 \cr
2527 0& 0 & 0 \cr
2528 9 & 9 & -1 \cr}$$
2529@end tex
2530@end iftex
2531@ifnottex
2532@display
2533 (1 0 0
2534 0 0 0
2535 9 9 -1)
2536@end display
2537@end ifnottex
2495 2538
2496Otherwise, @var{heuristic-mask} should specify the transparent color 2539Emboss edge-detection uses a matrix of
2497directly, as a list of three integers in the form @code{(@var{red} 2540@iftex
2498@var{green} @var{blue})}. 2541@tex
2542$$\pmatrix{ 2 & -1 & 0 \cr
2543 -1 & 0 & 1 \cr
2544 0 & 1 & -2 \cr}$$
2545@end tex
2546@end iftex
2547@ifnottex
2548@display
2549 ( 2 -1 0
2550 -1 0 1
2551 0 1 -2)
2552@end display
2553@end ifnottex
2554
2555@item disabled
2556Specifies transforming the image so that it looks ``disabled''.
2557@end table
2558
2559@item :mask @var{mask}
2560If @var{mask} is @code{heuristic} or @code{(heuristic @var{bg})}, build
2561a clipping mask for the image, so that the background of a frame is
2562visible behind the image. If @var{bg} is not specified, or if @var{bg}
2563is @code{t}, determine the background color of the image by looking at
2564the four corners of the image, assuming the most frequently occurring
2565color from the corners is the background color of the image. Otherwise,
2566@var{bg} must be a list @code{(@var{red} @var{green} @var{blue})}
2567specifying the color to assume for the background of the image.
2568
2569If @var{mask} is nil, remove a mask from the image, if it has one. Images
2570in some formats include a mask which can be removed by specifying
2571@code{:mask nil}.
2499 2572
2500@item :file @var{file} 2573@item :file @var{file}
2501The @code{:file} property specifies to load the image from file 2574The @code{:file} property specifies to load the image from file
@@ -2515,6 +2588,13 @@ for some, @code{:data} alone is not enough, so you need to use other
2515image properties along with @code{:data}. 2588image properties along with @code{:data}.
2516@end table 2589@end table
2517 2590
2591@defun image-mask-p spec &optional frame
2592@tindex image-mask-p
2593This function returns @code{t} if image @var{spec} has a mask bitmap.
2594@var{frame} is the frame on which the image will be displayed.
2595@var{frame} @code{nil} or omitted means to use the selected frame.
2596@end defun
2597
2518@node XBM Images 2598@node XBM Images
2519@subsection XBM Images 2599@subsection XBM Images
2520@cindex XBM 2600@cindex XBM