Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/trunk/src/eXene/lib/window/image.sml
ViewVC logotype

Diff of /sml/trunk/src/eXene/lib/window/image.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1349, Wed Sep 3 22:22:18 2003 UTC revision 1350, Fri Sep 5 21:34:27 2003 UTC
# Line 53  Line 53 
53    
54      exception BadImageData      exception BadImageData
55    
56        val w8vextract = Word8VectorSlice.vector o Word8VectorSlice.slice
57    
58      datatype image = IMAGE of {      datatype image = IMAGE of {
59          sz : Geometry.size,          sz : Geometry.size,
60          data : Word8Vector.vector list list          data : Word8Vector.vector list list
# Line 285  Line 287 
287                              if (byteOffset = 0 andalso numBytes = W8V.length row)                              if (byteOffset = 0 andalso numBytes = W8V.length row)
288                                then row :: (extractRow(i-1, rest))                                then row :: (extractRow(i-1, rest))
289                                else (                                else (
290                                  W8V.extract(row, byteOffset, SOME numBytes))                                  w8vextract(row, byteOffset, SOME numBytes))
291                                    :: (extractRow (i-1, rest))                                    :: (extractRow (i-1, rest))
292                          | extractRow (i,[]) = MLXError.impossible "Image: extractRow"                          | extractRow (i,[]) = MLXError.impossible "Image: extractRow"
293                        in                        in
# Line 397  Line 399 
399            val linesPerPlane = #ht szinfo            val linesPerPlane = #ht szinfo
400            val bytesPerLine = roundUp (#wid szinfo, #bitmap_scanline_pad dpyInfo) div 8            val bytesPerLine = roundUp (#wid szinfo, #bitmap_scanline_pad dpyInfo) div 8
401            val bytesPerPlane = bytesPerLine * linesPerPlane            val bytesPerPlane = bytesPerLine * linesPerPlane
402            fun doLine start = swapfn(W8V.extract(data, start, SOME bytesPerLine))            fun doLine start = swapfn(w8vextract(data, start, SOME bytesPerLine))
403            fun mkLine (i, start) =            fun mkLine (i, start) =
404                  if i = linesPerPlane                  if i = linesPerPlane
405                    then []                    then []

Legend:
Removed from v.1349  
changed lines
  Added in v.1350

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0