1.0.4 • Published 2 years ago

image-writer v1.0.4

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Table of contents


Features

  • Place multiple breakable lines in the image
  • Customize font-family with Web Safe Font
  • Allow to set a background image
  • Set size of the image with responsive background
  • Add lines by the x and y axis

Installation instructions

Install ngx-image-writer from npm:

npm install ngx-image-writer --save

Add needed package to NgModule imports:

import { NgxImageWriterModule } from 'ngx-image-writer';

@NgModule({
  ...
  imports: [NgxImageWriterModule,...]
  ...
})

Add <image-writer> to your HTML passing options:

<image-writer [options]="options"></image-writer>

Options

OptionTypeRequiredDescription
backgroundImagestringnoBackground image to be written on
imageWidthnumberyesWidth for the image
imageHeightnumberyesHeight for the image
fieldsNgxImageWriterFields[]yesFields of text to be written in the image

Fields

OptionTypeRequiredDescription
contentstringyesText to be written
textAlignstringyesAlignment of the text start / end / left / center / right
fontstringyesSetup font properties for HTML canvas
lineHeightnumberyesHeight for the text line
lineWidthnumberyesWidth for the text line
xnumberyesx axis position for the text
ynumberyesy axis position for the text