Difference between revisions of "User:Lenny222"

From HaskellWiki
Jump to navigation Jump to search
Line 36: Line 36:
 
* Box
 
* Box
 
** splitVertical :: Int -> Double -> Box -> [Box] -- ^ number of boxes, space
 
** splitVertical :: Int -> Double -> Box -> [Box] -- ^ number of boxes, space
  +
  +
  +
* Shapes
  +
** RegularPolygon: Line => Polygon
  +
** Star: Line => Polygon
  +
   
 
* Color
 
* Color

Revision as of 12:02, 12 January 2010

Things i think need improvement

Chlor


Todo

  • Box
    • defaultBox
    • use function "elem" infix style
  • delete Layout/*
  • Box
    • splitHorizontal :: Int -> Double -> Box -> [Box] -- ^ number of boxes, space
subBoxWidth = (width - (n - 1) * subBoxMargin) / n
subBoxes = map (\i -> left + i * (subBoxWidth + subBoxMargin)) [0..n-1]
  • Box
    • splitVertical :: Int -> Double -> Box -> [Box] -- ^ number of boxes, space


  • Shapes
    • RegularPolygon: Line => Polygon
    • Star: Line => Polygon


  • Color
    • Color = RGB Double Double Double | CMYK
      • rgbColorRange1 :: Double -> Double -> Double -> Color
      • rgbColorRange255 :: Int -> Int -> Int -> Color
    • RGBA or Paint alpha?
  • Datatypes
    • Unit
      • defaultUnit
  data Unit =
          UnitCM
        | UnitEM
        | UnitEX
        | UnitIN
        | UnitMM
        | UnitPC
        | UnitPT
        | UnitPX
        | UnitPercent
        deriving(Eq, Show)
  • Datatypes
    • data Length = Length Unit Double deriving(Eq, Show)
      
  • AffineTransformation
    • aply directly or accumulate in list of trafos?
    • on the level of Object or Primitive?
  • SVG export
    • SvgPath
      • <path d="M 100 100 L 300 100 L 200 300 z" fill="red" stroke="blue" stroke-width="3" />
    • SvgRectangle
      • <rect x="400" y="100" width="400" height="200" fill="yellow" stroke="navy" stroke-width="10" />
  • ObjectLike: DList instead of List?
  • SVG XML generation
    • HStringTemplate?
    • HXT?
    • HaXml?
  • Layout
    • Instances
      • Column
      • Grid (cols, rows, margins)
      • Margin/Frame
        • content size (absolute, relative, remaining)
        • margin sizes (absolute, relative, remaining)
  • repeatedly
    • use HLint
    • use ghc -W
  • AffineTransformation

Ideas

  • layout
    • Table
    • SpaceHorizontal
    • SpaceVertical

Simplified Haskell homepage

A simplified Haskell frontpage

Why?