diagrams-lib-0.7.1.1: Embedded domain-specific language for declarative graphics

Maintainer | diagrams-discuss@googlegroups.com
Safe Haskell | None

Diagrams.TwoD.Image

Description

Importing external images into diagrams.

Synopsis

- data Image = Image {
  - imgFile :: FilePath
  - imgSize :: SizeSpec2D
  - imgTransf :: T2
  }
- image :: Renderable Image b => FilePath -> Double -> Double -> Diagram b R2

# Documentation

data Image Source

An external image primitive, representing an image the backend should import from another file when rendering.

Constructors

Image |

Fields

imgFile :: FilePath
imgSize :: SizeSpec2D
imgTransf :: T2

Instances

IsPrim Image |
Transformable Image |
HasOrigin Image |
Renderable Image NullBackend |

image :: Renderable Image b => FilePath -> Double -> Double -> Diagram b R2 Source

Take an external image from the specified file and turn it into a diagram with the specified width and height, centered at the origin. Note that the image's aspect ratio will be preserved; if the specified width and height have a different ratio than the image's aspect ratio, there will be extra space in one dimension.