1.0.4 • Published 11 months ago

rt-define-stroke-width v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

About

RT Define Stroke Width

Provides service that might calculate stroke width with specific CSS rules applied.

Usage

Add RtDefineStrokeWidthModule in imports into your module:

import {RtDefineStrokeWidthModule} from 'rt-define-stroke-width';

@NgModule({
  ...
  imports: [
    ...
    RtDefineStrokeWidthModule,
    ...
  ],
  ...
})
export class YourModule {
}  

Add RtDefineStrokeWidthService into constructor in your component and call getTextWidth method when needed.

Api

Service API:

  • getTextWidth - Defines width for stroke with specific CSS rules.

Example

Simple usage:

  constructor(private defineStrokeWidth: RtDefineStrokeWidthService) {
    this.strokeWidth = this.defineStrokeWidth.getTextWidth('text', 'font-size: 12px; font-family: Arial, sans-serif;');
  }

https://www.regulus.team/

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago