1.0.4 • Published 2 years ago

rt-define-stroke-width v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago