editor insert-image uses alpha by default

original commit: 881c18295693db60c6006890d0f0b2d1e956abc3
This commit is contained in:
Matthew Flatt 2010-10-21 07:47:30 -07:00
parent 6b486c622e
commit 04d103943a
3 changed files with 21 additions and 13 deletions

View File

@ -506,7 +506,7 @@
snip))
(def/public (insert-image [(make-or-false path-string?) [filename #f]]
[symbol? [type 'unknown]]
[image-type? [type 'unknown/alpha]]
[any? [relative? #f]]
[any? [inline-img? #t]])
(let ([filename (or filename
@ -518,7 +518,7 @@
(insert snip)))))
(def/public (on-new-image-snip [path-string? filename]
[symbol? type]
[image-type? type]
[any? relative?]
[any? inline-img?])
(make-object image-snip% filename type relative? inline-img?))

View File

@ -959,7 +959,11 @@ The @scheme[show-errors?] argument is no longer used.
@defmethod[(insert-image [filename (or/c path-string? #f) #f]
[type (or/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict) 'unknown]
[type (one-of/c 'unknown 'unknown/mask 'unknown/alpha
'gif 'gif/mask 'gif/alpha
'jpeg 'png 'png/mask 'png/alpha
'xbm 'xpm 'bmp 'pict)
'unknown/alpha]
[relative-path? any/c #f]
[inline? any/c #t])
void?]{
@ -1521,7 +1525,10 @@ Creates a @scheme[editor-snip%] with either a sub-editor from
@defmethod[(on-new-image-snip [filename path?]
[kind (or/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)]
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
'gif 'gif/mask 'gif/alpha
'jpeg 'png 'png/mask 'png/alpha
'xbm 'xpm 'bmp 'pict)]
[relative-path? any/c]
[inline? any/c])
(is-a?/c image-snip%)]{

View File

@ -9,9 +9,9 @@ An @scheme[image-snip%] is a snip that can display bitmap images
@defconstructor*/make[(([filename (or/c path-string? false/c) #f]
[kind (one-of/c 'unknown 'unknown/mask
'gif 'gif/mask
'jpeg 'png 'png/mask
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
'gif 'gif/mask 'gif/alpha
'jpeg 'png 'png/mask 'png/alpha
'xbm 'xpm 'bmp 'pict) 'unknown]
[relative-path? any/c #f]
[inline? any/c #t])
@ -95,9 +95,10 @@ relative to the owning editor's path}]
}
@defmethod[(get-filetype)
(one-of/c 'unknown 'unknwon/mask
'gif 'gif/mask
'jpeg 'png 'png/mask 'xbm 'xpm 'bmp 'pict)]{
(one-of/c 'unknown 'unknown/mask 'unknown/alpha
'gif 'gif/mask 'gif/alpha
'jpeg 'png 'png/mask 'png/alpha
'xbm 'xpm 'bmp 'pict)]{
Returns the kind used to load the currently loaded, non-inlined file,
or @scheme['unknown] if a file is not loaded or if a file was loaded
@ -106,9 +107,9 @@ Returns the kind used to load the currently loaded, non-inlined file,
}
@defmethod[(load-file [filename (or/c path-string? false/c)]
[kind (one-of/c 'unknown 'unknown/mask
'gif 'gif/mask
'jpeg 'png 'png/mask
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
'gif 'gif/mask 'gif/alpha
'jpeg 'png 'png/mask 'png/alpha
'xbm 'xpm 'bmp 'pict) 'unknown]
[relative-path? any/c #f]
[inline? any/c #t])