[etoys-dev] Etoys: Morphic-kfr.87.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 15 17:53:24 EDT 2012


Karl Ramberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-kfr.87.mcz

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

Name: Morphic-kfr.87
Author: kfr
Time: 15 March 2012, 10:52:08 pm
UUID: d52080e7-e1d8-4c55-82a9-65d2bae064bb
Ancestors: Morphic-bf.85

Slight adjustment in parameters that define the x-y plane, to make the way tick-marks on the two axes line up on the underlying grid more uniform.

=============== Diff against Morphic-bf.85 ===============

Item was changed:
  ----- Method: GraphPaperPanel class>>classicCartesianGraph (in category 'examples') -----
  classicCartesianGraph
  	"Answer a nicely configured playfield with horizontal and vertical axes and a background well-suited for determining units on the plane."
  
  	| aPlayfield horiz vert pixelsPerUnit parms |
  	aPlayfield := PasteUpMorph new extent: 642 @ 642.
  	horiz := HorizontalNumberLineMorph new.
  	horiz width: 640.
  
  	aPlayfield addMorphBack: horiz.
  	vert := VerticalNumberLineMorph new.
  	vert height: 640.
  	aPlayfield addMorphBack: vert.
  
  	pixelsPerUnit := 16.
  
  	horiz center: (aPlayfield center + (0 @ -2)).
  	vert center: (aPlayfield center + (-14 @ -2)).
  
  	horiz minValue: -20 pixelsPerUnit: pixelsPerUnit unitsPerMark: 1 marksPerLegend: 5.
  	vert minValue: -20 pixelsPerUnit: pixelsPerUnit unitsPerMark: 1 marksPerLegend: 5.
  
  	horiz registerGraphCoordinate: 0 atPlayfieldLocation: 322.
  	vert registerGraphCoordinate: 0 atPlayfieldLocation: 318.
  	vert showZero: false.
  
  	parms := GraphPaperParameters backgroundColor: Color green muchLighter gridColor: Color blue muchLighter gridEvery: 16 showDarkerGridAlso: true darkerGridColor: Color blue muchDarker darkerGridEvery: 10 offset: (0 @ 0).
  	aPlayfield establishGraphPaperFrom: parms.
  
  	horiz update.
  	vert update.
  
  	"temporary fudges to get this basically looking right, though there had been hope that the above attempts would have already succeded..."
  	WorldState addDeferredUIMessage:
+ 		[vert y: 296.
- 		[vert y: 294.
  		vert maxValue: 20.
  		horiz y: 314.
  		horiz maxValue: 20].
  
  	^ aPlayfield
  
  "
  GraphPaperPanel classicCartesianGraph openInHand
  "!



More information about the etoys-dev mailing list