editor insert-image uses alpha by default
original commit: 881c18295693db60c6006890d0f0b2d1e956abc3
This commit is contained in:
parent
6b486c622e
commit
04d103943a
|
@ -506,7 +506,7 @@
|
||||||
snip))
|
snip))
|
||||||
|
|
||||||
(def/public (insert-image [(make-or-false path-string?) [filename #f]]
|
(def/public (insert-image [(make-or-false path-string?) [filename #f]]
|
||||||
[symbol? [type 'unknown]]
|
[image-type? [type 'unknown/alpha]]
|
||||||
[any? [relative? #f]]
|
[any? [relative? #f]]
|
||||||
[any? [inline-img? #t]])
|
[any? [inline-img? #t]])
|
||||||
(let ([filename (or filename
|
(let ([filename (or filename
|
||||||
|
@ -518,7 +518,7 @@
|
||||||
(insert snip)))))
|
(insert snip)))))
|
||||||
|
|
||||||
(def/public (on-new-image-snip [path-string? filename]
|
(def/public (on-new-image-snip [path-string? filename]
|
||||||
[symbol? type]
|
[image-type? type]
|
||||||
[any? relative?]
|
[any? relative?]
|
||||||
[any? inline-img?])
|
[any? inline-img?])
|
||||||
(make-object image-snip% filename type relative? inline-img?))
|
(make-object image-snip% filename type relative? inline-img?))
|
||||||
|
|
|
@ -959,7 +959,11 @@ The @scheme[show-errors?] argument is no longer used.
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(insert-image [filename (or/c path-string? #f) #f]
|
@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]
|
[relative-path? any/c #f]
|
||||||
[inline? any/c #t])
|
[inline? any/c #t])
|
||||||
void?]{
|
void?]{
|
||||||
|
@ -1521,7 +1525,10 @@ Creates a @scheme[editor-snip%] with either a sub-editor from
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(on-new-image-snip [filename path?]
|
@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]
|
[relative-path? any/c]
|
||||||
[inline? any/c])
|
[inline? any/c])
|
||||||
(is-a?/c image-snip%)]{
|
(is-a?/c image-snip%)]{
|
||||||
|
|
|
@ -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]
|
@defconstructor*/make[(([filename (or/c path-string? false/c) #f]
|
||||||
[kind (one-of/c 'unknown 'unknown/mask
|
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
'xbm 'xpm 'bmp 'pict) 'unknown]
|
'xbm 'xpm 'bmp 'pict) 'unknown]
|
||||||
[relative-path? any/c #f]
|
[relative-path? any/c #f]
|
||||||
[inline? any/c #t])
|
[inline? any/c #t])
|
||||||
|
@ -95,9 +95,10 @@ relative to the owning editor's path}]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-filetype)
|
@defmethod[(get-filetype)
|
||||||
(one-of/c 'unknown 'unknwon/mask
|
(one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask 'xbm 'xpm 'bmp 'pict)]{
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
|
'xbm 'xpm 'bmp 'pict)]{
|
||||||
|
|
||||||
Returns the kind used to load the currently loaded, non-inlined file,
|
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
|
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)]
|
@defmethod[(load-file [filename (or/c path-string? false/c)]
|
||||||
[kind (one-of/c 'unknown 'unknown/mask
|
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
'xbm 'xpm 'bmp 'pict) 'unknown]
|
'xbm 'xpm 'bmp 'pict) 'unknown]
|
||||||
[relative-path? any/c #f]
|
[relative-path? any/c #f]
|
||||||
[inline? any/c #t])
|
[inline? any/c #t])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user