diff options
| author | Dave Love | 2000-11-29 14:53:29 +0000 |
|---|---|---|
| committer | Dave Love | 2000-11-29 14:53:29 +0000 |
| commit | 62fb5c6645a442dfcc5a32aee9f047e0814fe489 (patch) | |
| tree | 9f1d3b1b8b1921432e3ee45dee012c56c43f1b2d | |
| parent | 4a967a9b436dce9a090c38c40d9c7c7712512449 (diff) | |
| download | emacs-62fb5c6645a442dfcc5a32aee9f047e0814fe489.tar.gz emacs-62fb5c6645a442dfcc5a32aee9f047e0814fe489.zip | |
image-mask-p
keymap property
image property changes
| -rw-r--r-- | lispref/display.texi | 112 |
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). | |||
| 928 | If this property is non-@code{nil}, it specifies a keymap for a portion | 928 | If this property is non-@code{nil}, it specifies a keymap for a portion |
| 929 | of the text. The property's value replaces the buffer's local map, when | 929 | of the text. The property's value replaces the buffer's local map, when |
| 930 | the character after point is within the overlay. @xref{Active Keymaps}. | 930 | the character after point is within the overlay. @xref{Active Keymaps}. |
| 931 | |||
| 932 | @item keymap | ||
| 933 | @kindex keymap @r{(overlay property)} | ||
| 934 | The @code{keymap} property is similar to @code{local-map} but overrides the | ||
| 935 | buffer's local map (and the map specified by the @code{local-map} | ||
| 936 | property) 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 | |||
| 2477 | conversion algorithm that should be applied to the image before it is | 2483 | conversion algorithm that should be applied to the image before it is |
| 2478 | displayed; the value, @var{algorithm}, specifies which algorithm. | 2484 | displayed; the value, @var{algorithm}, specifies which algorithm. |
| 2479 | 2485 | ||
| 2480 | Currently, 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 |
| 2482 | algorithm, which blurs out small differences in color while highlighting | 2488 | @itemx emboss |
| 2483 | larger differences. People sometimes consider this useful for | 2489 | Specifies the Laplace edge detection algorithm, which blurs out small |
| 2484 | displaying the image for a ``disabled'' button. | 2490 | differences in color while highlighting larger differences. People |
| 2491 | sometimes consider this useful for displaying the image for a | ||
| 2492 | ``disabled'' button. | ||
| 2493 | |||
| 2494 | @item (edge-detection :matrix @var{matrix} :color-adjust @var{adjust}) | ||
| 2495 | Specifies a general edge-detection algorithm. @var{matrix} must be | ||
| 2496 | either a nine-element list or a nine-element vector of numbers. A pixel | ||
| 2497 | at position @math{x/y} in the transformed image is computed from | ||
| 2498 | original pixels around that position. @var{matrix} specifies, for each | ||
| 2499 | pixel in the neighborhood of @math{x/y}, a factor with which that pixel | ||
| 2500 | will influence the transformed pixel; element @math{0} specifies the | ||
| 2501 | factor for the pixel at @math{x-1/y-1}, element @math{1} the factor for | ||
| 2502 | the 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} | 2518 | The resulting pixel is computed from the color intensity of the color |
| 2487 | The @code{:heuristic-mask} property, if non-@code{nil}, specifies that a | 2519 | resulting from summing up the RGB values of surrounding pixels, |
| 2488 | certain color in the image should be transparent. Each pixel where this | 2520 | multiplied by the specified factors, and dividing that sum by the sum |
| 2489 | color appears will actually allow the frame's background to show | 2521 | of the factors' absolute values. |
| 2490 | through. | ||
| 2491 | 2522 | ||
| 2492 | If @var{transparent-color} is @code{t}, then determine the transparent | 2523 | Laplace edge-detection currently uses a matrix of |
| 2493 | color by looking at the four corners of the image. This uses the color | 2524 | @iftex |
| 2494 | that 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 | ||
| 2496 | Otherwise, @var{heuristic-mask} should specify the transparent color | 2539 | Emboss edge-detection uses a matrix of |
| 2497 | directly, 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 | ||
| 2556 | Specifies transforming the image so that it looks ``disabled''. | ||
| 2557 | @end table | ||
| 2558 | |||
| 2559 | @item :mask @var{mask} | ||
| 2560 | If @var{mask} is @code{heuristic} or @code{(heuristic @var{bg})}, build | ||
| 2561 | a clipping mask for the image, so that the background of a frame is | ||
| 2562 | visible behind the image. If @var{bg} is not specified, or if @var{bg} | ||
| 2563 | is @code{t}, determine the background color of the image by looking at | ||
| 2564 | the four corners of the image, assuming the most frequently occurring | ||
| 2565 | color 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})} | ||
| 2567 | specifying the color to assume for the background of the image. | ||
| 2568 | |||
| 2569 | If @var{mask} is nil, remove a mask from the image, if it has one. Images | ||
| 2570 | in 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} |
| 2501 | The @code{:file} property specifies to load the image from file | 2574 | The @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 | |||
| 2515 | image properties along with @code{:data}. | 2588 | image 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 | ||
| 2593 | This 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 |