The Trunk: Graphics-fbs.218.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-fbs.218.mcz

commits-2
Frank Shearar uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-fbs.218.mcz

==================== Summary ====================

Name: Graphics-fbs.218
Author: fbs
Time: 12 July 2013, 8:54:36.241 pm
UUID: 49b5432b-fd0e-c849-84ba-294184870334
Ancestors: Graphics-fbs.217

Use UIManager default inform: '' during: [], not Utilities.

=============== Diff against Graphics-fbs.217 ===============

Item was changed:
  ----- Method: BDFFontReader class>>downloadFonts (in category 'resource download') -----
  downloadFonts  "BDFFontReader downloadFonts"
  "Download a standard set of BDF sources from x.org.  
  The combined size of these source files is around 1.2M; after conversion
  to .sf2 format they may be deleted."
 
  | heads tails filenames baseUrl basePath |
  heads := #( 'charR' 'courR' 'helvR' 'lubR' 'luRS' 'lutRS' 'ncenR' 'timR' ).
  tails := #( '08' '10' '12' '14' '18' '24').
 
  filenames := OrderedCollection new.
  heads do: [:head |
  filenames addAll: (tails collect: [:tail | head , tail , '.bdf'])
  ].
  baseUrl := 'http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/fonts/bdf/75dpi/' asUrl.
  basePath := baseUrl path.
 
  filenames do: [:filename |
  | document newPath newUrl |
  newUrl := baseUrl clone.
  newPath := OrderedCollection newFrom: basePath.
 
  newPath addLast: filename.
  newUrl path: newPath.
 
+ UIManager default informUser: 'Fetching ' , filename during:
- Utilities informUser: 'Fetching ' , filename during:
  [document := newUrl retrieveContents].
 
  MultiByteFileStream newFileNamed: filename do: [ :f |
  f
  wantsLineEndConversion: true;
  nextPutAll: document content ]
  ].
  !

Item was changed:
  ----- Method: GIFReadWriter class>>grabScreenAndSaveOnDisk (in category 'examples') -----
  grabScreenAndSaveOnDisk
  "GIFReaderWriter grabScreenAndSaveOnDisk"
 
  | form fileName |
  form := Form fromUser.
  form bits size = 0 ifTrue: [^Beeper beep].
  fileName := FileDirectory default nextNameFor: 'Squeak' extension: 'gif'.
+ UIManager default informUser: 'Writing ' , fileName
- Utilities informUser: 'Writing ' , fileName
  during: [GIFReadWriter putForm: form onFileNamed: fileName]!

Item was changed:
  ----- Method: WarpBlt class>>test1 (in category 'examples') -----
  test1   "Display restoreAfter: [WarpBlt test1]"
  "Demonstrates variable scale and rotate"
  | warp pts r1 p0 p ext |
+ UIManager default informUser: 'Choose a rectangle with interesting stuff'
- Utilities informUser: 'Choose a rectangle with interesting stuff'
  during: [r1 := Rectangle originFromUser: 50@50.
  Sensor waitNoButton].
+ UIManager default informUser: 'Now click down and up
- Utilities informUser: 'Now click down and up
  and move the mouse around the dot'
  during: [p0 := Sensor waitClickButton.
  (Form dotOfSize: 8) displayAt: p0].
  warp := (self toForm: Display)
  clipRect: (0@0 extent: r1 extent*5);
  sourceForm: Display;
  combinationRule: Form over.
  [Sensor anyButtonPressed] whileFalse:
  [p := Sensor cursorPoint.
  pts := {r1 topLeft. r1 bottomLeft. r1 bottomRight. r1 topRight}
  collect: [:pt | pt rotateBy: (p-p0) theta about: r1 center].
  ext := (r1 extent*((p-p0) r / 20.0 max: 0.1)) asIntegerPoint.
  warp copyQuad: pts toRect: (r1 extent*5-ext//2 extent: ext)]!

Item was changed:
  ----- Method: WarpBlt class>>test12 (in category 'examples') -----
  test12   "Display restoreAfter: [WarpBlt test12]"
  "Just like test1, but comparing smooth to non-smooth warps"
  | warp pts r1 p0 p ext warp2 |
+ UIManager default informUser: 'Choose a rectangle with interesting stuff'
- Utilities informUser: 'Choose a rectangle with interesting stuff'
  during: [r1 := Rectangle originFromUser: 50@50.
  Sensor waitNoButton].
+ UIManager default informUser: 'Now click down and up
- Utilities informUser: 'Now click down and up
  and move the mouse around the dot'
  during: [p0 := Sensor waitClickButton.
  (Form dotOfSize: 8) displayAt: p0].
  warp := (self toForm: Display)
  cellSize: 2;  "installs a colormap"
  clipRect: (0@0 extent: r1 extent*5);
  sourceForm: Display;
  combinationRule: Form over.
  warp2 := (self toForm: Display)
  clipRect: ((0@0 extent: r1 extent*5) translateBy: 250@0);
  sourceForm: Display;
  combinationRule: Form over.
  [Sensor anyButtonPressed] whileFalse:
  [p := Sensor cursorPoint.
  pts := {r1 topLeft. r1 bottomLeft. r1 bottomRight. r1 topRight}
  collect: [:pt | pt rotateBy: (p-p0) theta about: r1 center].
  ext := (r1 extent*((p-p0) r / 20.0 max: 0.1)) asIntegerPoint.
  warp copyQuad: pts toRect: (r1 extent*5-ext//2 extent: ext).
  warp2 copyQuad: pts toRect: ((r1 extent*5-ext//2 extent: ext) translateBy: 250@0).
  ]!

Item was changed:
  ----- Method: WarpBlt class>>test5 (in category 'examples') -----
  test5   "Display restoreAfter: [WarpBlt test5]"
  "Demonstrates variable scale and rotate"
  | warp pts r1 p0 p |
+ UIManager default informUser: 'Choose a rectangle with interesting stuff'
- Utilities informUser: 'Choose a rectangle with interesting stuff'
  during: [r1 := Rectangle fromUser.
  Sensor waitNoButton].
+ UIManager default informUser: 'Now click down and up
- Utilities informUser: 'Now click down and up
  and move the mouse around the dot'
  during: [p0 := Sensor waitClickButton.
  (Form dotOfSize: 8) displayAt: p0].
  warp := (self toForm: Display)
  cellSize: 1;
  sourceForm: Display;
  cellSize: 2;  "installs a colormap"
  combinationRule: Form over.
  [Sensor anyButtonPressed] whileFalse:
  [p := Sensor cursorPoint.
  pts := {r1 topLeft. r1 bottomLeft. r1 bottomRight. r1 topRight}
  collect: [:pt | pt rotateBy: (p-p0) theta about: r1 center].
  warp copyQuad: pts toRect: (r1 translateBy: r1 width@0)]!