MCPcopy Create free account
hub / github.com/dillo-browser/dillo / queueDrawRange

Method queueDrawRange

dw/textblock.cc:3050–3077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3048}
3049
3050void Textblock::queueDrawRange (int index1, int index2)
3051{
3052 DBG_OBJ_ENTER ("draw", 0, "queueDrawRange", "%d, %d", index1, index2);
3053
3054 int from = misc::min (index1, index2);
3055 int to = misc::max (index1, index2);
3056
3057 from = misc::min (from, words->size () - 1);
3058 from = misc::max (from, 0);
3059 to = misc::min (to, words->size () - 1);
3060 to = misc::max (to, 0);
3061
3062 int line1idx = findLineOfWord (from);
3063 int line2idx = findLineOfWord (to);
3064
3065 if (line1idx >= 0 && line2idx >= 0) {
3066 Line *line1 = lines->getRef (line1idx),
3067 *line2 = lines->getRef (line2idx);
3068 int y = lineYOffsetWidget (line1) + line1->borderAscent -
3069 line1->contentAscent;
3070 int h = lineYOffsetWidget (line2) + line2->borderAscent +
3071 line2->contentDescent - y;
3072
3073 queueDrawArea (0, y, allocation.width, h);
3074 }
3075
3076 DBG_OBJ_LEAVE ();
3077}
3078
3079void Textblock::updateReference (int ref)
3080{

Callers 1

Calls 4

minFunction · 0.85
maxFunction · 0.85
sizeMethod · 0.45
getRefMethod · 0.45

Tested by

no test coverage detected