Difference between revisions of "User:Lenny222"

From HaskellWiki
Jump to navigation Jump to search
Line 14: Line 14:
 
==== Todo ====
 
==== Todo ====
   
* data Shape = Circle | Ellipse | Path | Rectangle | RegularPolygon
+
* data Shape = Circle | Ellipse | Path | Rectangle | RegularPolygon | Text
 
** area :: Shape -> Area
 
** area :: Shape -> Area
 
*** returns the shape area, without stroke
 
*** returns the shape area, without stroke

Revision as of 12:14, 10 December 2009

Things i think need improvement

Chlor

Todo

  • data Shape = Circle | Ellipse | Path | Rectangle | RegularPolygon | Text
    • area :: Shape -> Area
      • returns the shape area, without stroke
    • path :: Shape -> Path
  • class ObjectLike
    • area :: a -> Area
      • returns the boundig area, including stroke and effects
    • effects:: a -> [Effect]
    • fill:: a -> maybe paint
    • shapes :: a -> [Shape]
      • converts the Object to a list of Shape
    • stroke:: a -> Maybe Stroke


  • Layout
    • size
      • adjustToArea :: Object -> Area -> Object
      • adjustToHeight :: Object -> Double -> Object
      • adjustToWidth :: Object -> Double -> Object
      • getArea :: Object -> Area
    • Instances
      • Column
      • Grid (cols, rows, margins)
      • Margin/Frame
        • content size (absolute, relative, remaining)
        • margin sizes (absolute, relative, remaining)
      • Row
  • Export
    • Svg
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg" version="1.1">
  <path d="M 100 100 L 300 100 L 200 300 z"
        fill="red" stroke="blue" stroke-width="3" />
</svg>
  • Vector
    • createVectors :: [Double] -> [Vector2d]
  • AffineTransformation
  • Shape
    • Sine
    • Spiral
    • Star
    • Pie Chart (only for displaying fractions)
  • Path
    • approximate :: [Vector2D] -> [Segment]
  • Shape
    • intersect
    • intersections
  • Object
    • anchor point
      • point
      • orientation: center, left, topLeft, top, topRight, right, etc.

Ideas

  • layout
    • Table
    • SpaceHorizontal
    • SpaceVertical

Simplified Haskell homepage

A simplified Haskell frontpage

Why?

Contact

Contact me via

q 4 0 9

a t

k u d l i n g

d o t

d e


[1]