--- a/UIPainter.st Fri Nov 07 20:41:36 2008 +0100
+++ b/UIPainter.st Fri Nov 07 21:02:02 2008 +0100
@@ -1624,6 +1624,11 @@
itemValue: useSketch
translateLabel: true
)
+ (MenuItem
+ label: 'Load Image as Background...'
+ itemValue: useBackgroundImage
+ translateLabel: true
+ )
)
nil
nil
@@ -5297,12 +5302,27 @@
painter replaceSelectionBy:newSpec.
!
-useSketch
- "select sketchfile to underly"
+useBackgroundImage
+ "select bitmap to underly"
|fn|
- fn := Dialog requestFileName:'Sketch ?' pattern:'*.TOP' fromDirectory:'f:'.
+ fn := Dialog requestFileName:'Bitmap Image File ?' pattern:'*.gif;*.tiff;*.jpg;*.png' fromDirectory:'f:'.
+ fn isNil ifTrue:[
+ ^ self
+ ].
+ painter useSketchFile:fn
+
+ "Created: / 16-01-2008 / 17:49:20 / cg"
+!
+
+useSketch
+ "select sketchfile to underly.
+ Sketchfiles are generated by notepads, which can offline-store drawn sketches"
+
+ |fn|
+
+ fn := Dialog requestFileName:'Sketch (Notepad Drawing) ?' pattern:'*.TOP' fromDirectory:'f:'.
fn isNil ifTrue:[
^ self
].