canvasDimension :: Simple Lens (PageArrangement a) CanvasDimension 
canvasDimension = lens getter setter 
  where 
    getter :: PageArrangement a -> CanvasDimension
    getter (SingleArrangement cdim _ _) = cdim
    getter (ContinuousArrangement cdim _ _ _) = cdim
    setter :: PageArrangement a -> CanvasDimension -> PageArrangement a
    setter (SingleArrangement _ pdim vbbox) cdim = SingleArrangement cdim pdim vbbox
    setter (ContinuousArrangement _ ddim pfunc vbbox) cdim = 
      ContinuousArrangement cdim ddim pfunc vbbox

-- |    
canvasDimension :: Simple Lens (PageArrangement a) CanvasDimension
canvasDimension = lens getter setter 
  where 
    getter :: PageArrangement a -> CanvasDimension
    getter (SingleArrangement cdim _ _) = cdim
    getter (ContinuousArrangement cdim _ _ _) = cdim
    setter :: PageArrangement a -> CanvasDimension -> PageArrangement a
    setter (SingleArrangement _ pdim vbbox) cdim = SingleArrangement cdim pdim vbbox
    setter (ContinuousArrangement _ ddim pfunc vbbox) cdim = 
      ContinuousArrangement cdim ddim pfunc vbbox

-- |    
canvasDimension = lens getter setter 
  where 
    getter :: PageArrangement a -> CanvasDimension
    getter (SingleArrangement cdim _ _) = cdim
    getter (ContinuousArrangement cdim _ _ _) = cdim
    setter :: PageArrangement a -> CanvasDimension -> PageArrangement a
    setter (SingleArrangement _ pdim vbbox) cdim = SingleArrangement cdim pdim vbbox
    setter (ContinuousArrangement _ ddim pfunc vbbox) cdim = 
      ContinuousArrangement cdim ddim pfunc vbbox

-- |    