| 1 |
import QtQuick 2.0 |
| 2 |
|
| 3 |
//vary font style, native rendering at non-integer offsets |
| 4 |
|
| 5 |
Item { |
| 6 |
id: topLevel |
| 7 |
width: 320 |
| 8 |
height: 580 |
| 9 |
|
| 10 |
Repeater { |
| 11 |
model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] |
| 12 |
Text { |
| 13 |
y: 20 * index |
| 14 |
clip: true |
| 15 |
renderType: Text.NativeRendering |
| 16 |
width: parent.width |
| 17 |
wrapMode: Text.Wrap |
| 18 |
font.pointSize: 10 |
| 19 |
style: modelData |
| 20 |
styleColor: "green" |
| 21 |
text: "The quick fox jumps in style " + modelData |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
Repeater { |
| 26 |
model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] |
| 27 |
Text { |
| 28 |
y: 100.5 + 20 * index |
| 29 |
clip: true |
| 30 |
renderType: Text.NativeRendering |
| 31 |
width: parent.width |
| 32 |
wrapMode: Text.Wrap |
| 33 |
font.pointSize: 10 |
| 34 |
style: modelData |
| 35 |
styleColor: "green" |
| 36 |
text: "The quick fox jumps in style " + modelData |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
Repeater { |
| 41 |
model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] |
| 42 |
Text { |
| 43 |
y: 200.5 + 20 * index |
| 44 |
x: 0.5 |
| 45 |
clip: true |
| 46 |
renderType: Text.NativeRendering |
| 47 |
width: parent.width |
| 48 |
wrapMode: Text.Wrap |
| 49 |
font.pointSize: 10 |
| 50 |
style: modelData |
| 51 |
styleColor: "green" |
| 52 |
text: "The quick fox jumps in style " + modelData |
| 53 |
} |
| 54 |
} |
| 55 |
|
| 56 |
Repeater { |
| 57 |
model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] |
| 58 |
Text { |
| 59 |
y: 300.5 + 20 * index |
| 60 |
x: 0.5 |
| 61 |
clip: true |
| 62 |
renderType: Text.NativeRendering |
| 63 |
width: parent.width |
| 64 |
wrapMode: Text.Wrap |
| 65 |
font.pointSize: 10 |
| 66 |
style: modelData |
| 67 |
styleColor: "green" |
| 68 |
text: "The quick fox jumps in style " + modelData |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
Repeater { |
| 73 |
model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] |
| 74 |
Rectangle { |
| 75 |
y: 400.5 + 20 * index |
| 76 |
x: 0.5 |
| 77 |
width: topLevel.width |
| 78 |
height: topLevel.height |
| 79 |
clip: true |
| 80 |
Text { |
| 81 |
renderType: Text.NativeRendering |
| 82 |
width: parent.width |
| 83 |
wrapMode: Text.Wrap |
| 84 |
font.pointSize: 10 |
| 85 |
style: modelData |
| 86 |
styleColor: "green" |
| 87 |
text: "The quick fox jumps in style " + modelData |
| 88 |
} |
| 89 |
} |
| 90 |
} |
| 91 |
} |