| 152 | } |
| 153 | |
| 154 | void PiuCodeComputeStyle(PiuCode* self) |
| 155 | { |
| 156 | xsMachine* the = (*self)->the; |
| 157 | PiuApplication* application = (*self)->application; |
| 158 | PiuContainer* container = (PiuContainer*)self; |
| 159 | PiuStyleLink* list = (*application)->styleList; |
| 160 | PiuStyleLink* chain = NULL; |
| 161 | while (container) { |
| 162 | PiuStyle* style = (*container)->style; |
| 163 | if (style) { |
| 164 | list = PiuStyleLinkMatch(the, list, chain, style); |
| 165 | chain = list; |
| 166 | } |
| 167 | container = (*container)->container; |
| 168 | } |
| 169 | if (chain) { |
| 170 | PiuStyle* result = PiuStyleLinkCompute(the, chain, application); |
| 171 | (*self)->computedStyle = result; |
| 172 | xsResult = xsString("w"); |
| 173 | (*self)->columnWidth = PiuFontGetWidthSubPixel((*result)->font, &xsResult, 0, 1); |
| 174 | (*self)->lineHeight = PiuFontGetHeight((*result)->font); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | void PiuCodeDictionary(xsMachine* the, void* it) |
| 179 | { |
no test coverage detected