-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathTextFormatUtil.hx
More file actions
34 lines (28 loc) · 998 Bytes
/
TextFormatUtil.hx
File metadata and controls
34 lines (28 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Feathers UI
Copyright 2026 Bowler Hat LLC. All Rights Reserved.
This program is free software. You can redistribute and/or modify it in
accordance with the terms of the accompanying license agreement.
*/
package feathers.utils;
import openfl.text.TextFormat;
/**
Utility functions for `openfl.text.TextFormat` objects.
@since 1.0.0
**/
class TextFormatUtil {
/**
Creates a copy of the `openfl.text.TextFormat` object.
@since 1.0.0
**/
public static function clone(original:TextFormat):TextFormat {
var clone = new TextFormat(original.font, original.size, original.color, original.bold, original.italic, original.underline, original.url,
original.target, original.align, original.leftMargin, original.rightMargin, original.indent, original.leading);
clone.blockIndent = original.blockIndent;
clone.bullet = original.bullet;
clone.kerning = original.kerning;
clone.letterSpacing = original.letterSpacing;
clone.tabStops = original.tabStops;
return clone;
}
}