Skip to content

Commit 652fa1f

Browse files
committed
fix typos in the API docs
1 parent 8ff3f51 commit 652fa1f

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎src/colors.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class Colors {
170170
}
171171

172172
/**
173-
* Converts a color value to an array of RGB values (ignoring the colors alpha)
173+
* Converts a color value to an array of RGB values (ignoring the color's alpha)
174174
* @param color The color value to convert
175175
* @returns The RGB values ([R, G, B])
176176
*/

‎src/image.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface QuantizeOptions {
156156
ditherStrength?: number;
157157
}
158158

159-
/** How {@link Image.transform} samples the pixels between the source's */
159+
/** How {@link Image.transform} and {@link Image.rotate} sample the pixels between the source's */
160160
export type TransformMode = 'nearest-neighbor' | 'bilinear' | 'bicubic';
161161

162162
// the sampling modes of Image.transform()
@@ -724,14 +724,14 @@ export class Image {
724724
}
725725

726726
/**
727-
* The images width
727+
* The image's width
728728
*/
729729
get width(): number {
730730
return this.__width__;
731731
}
732732

733733
/**
734-
* The images height
734+
* The image's height
735735
*/
736736
get height(): number {
737737
return this.__height__;
@@ -1080,8 +1080,8 @@ export class Image {
10801080
* The region is clipped to the image, so the result can be smaller than the requested size
10811081
* @param x The x offset (0-based)
10821082
* @param y The y offset (0-based)
1083-
* @param width The new images width
1084-
* @param height The new images height
1083+
* @param width The new width
1084+
* @param height The new height
10851085
*/
10861086
crop(x: number, y: number, width: number, height: number): this {
10871087
const bounds = this.__crop_bounds__(x, y, width, height);
@@ -1537,7 +1537,7 @@ export class Image {
15371537
}
15381538

15391539
/**
1540-
* Inverts the images colors
1540+
* Inverts the image's colors
15411541
*/
15421542
invert(): this {
15431543
if (this.__gain_map__) return this.__unboost__(image => image.invert());
@@ -1552,15 +1552,15 @@ export class Image {
15521552
}
15531553

15541554
/**
1555-
* Inverts the images lightness (HSL), keeping hue and saturation: dark colors become light and vice versa
1555+
* Inverts the image's lightness (HSL), keeping hue and saturation: dark colors become light and vice versa
15561556
*/
15571557
invertLightness(): this {
15581558
if (this.__gain_map__) return this.__unboost__(image => image.invertLightness());
15591559
return this.__map_hsla__(c => { c.l = 1 - c.l; });
15601560
}
15611561

15621562
/**
1563-
* Inverts the images value (HSV), keeping hue and saturation: the brightest channel `v` becomes `255 - v`
1563+
* Inverts the image's value (HSV), keeping hue and saturation: the brightest channel `v` becomes `255 - v`
15641564
* and the others scale along, black becomes white
15651565
*/
15661566
invertValue(): this {
@@ -1584,7 +1584,7 @@ export class Image {
15841584
}
15851585

15861586
/**
1587-
* Shifts the images hue
1587+
* Shifts the image's hue
15881588
* @param degrees How many degrees to shift the hue by
15891589
*/
15901590
hueShift(degrees: number): this {
@@ -2273,7 +2273,7 @@ export class Image {
22732273
}
22742274

22752275
/**
2276-
* Rounds the images corners, with antialiased edges
2276+
* Rounds the image's corners, with antialiased edges
22772277
* @param options See {@link RoundCornersOptions}
22782278
*/
22792279
roundCorners(options?: RoundCornersOptions): this;
@@ -2426,7 +2426,7 @@ export class Image {
24262426

24272427
/**
24282428
* Encodes the image as run length encoded TGA (32 bit, or 24 bit if the image is opaque)
2429-
* @param options See {@link EncodeOptions}
2429+
* @param options See {@link TGAEncodeOptions}
24302430
*/
24312431
async encodeTGA(options: TGAEncodeOptions = {}): Promise<Uint8Array<ArrayBuffer>> {
24322432
checkOptions(options, 'image.encodeTGA({ metadata })');
@@ -2659,7 +2659,7 @@ export class Image {
26592659
}
26602660

26612661
/**
2662-
* Creates a new image from the given SVG
2662+
* Creates a new image from the given SVG.
26632663
* Supports shapes, paths, transforms, use/symbol, CSS styles, gradients, patterns, strokes, markers, clip paths,
26642664
* masks, opacity, blend modes, filters (all primitives and the filter functions) and images embedded as data URIs
26652665
* (PNG, JPEG, GIF, WebP, SVG) or given with {@link SVGOptions.images}, and text with the given or embedded fonts

0 commit comments

Comments
 (0)