Lines Matching defs:paint

376 		XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
377 paint->next = sink->text_sink.paint->bearings;
378 sink->text_sink.paint->bearings = paint;
379 paint->x = x - (paint->width = CharWidth(sink, font, 0, c));
380 paint->y = y + ascent;
381 paint->property = property;
382 paint->max_ascent = ascent;
383 paint->max_descent = descent;
384 paint->backtabs = NULL;
385 paint->highlight = (Boolean)highlight;
386 paint->length = 1;
387 paint->text = XtMalloc(1);
388 paint->text[0] = (char)c;
411 XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
412 paint->next = sink->text_sink.paint->bearings;
413 sink->text_sink.paint->bearings = paint;
414 paint->x = x;
415 paint->width = -CharWidth(sink, font, 0, c);
416 paint->y = y + ascent;
417 paint->property = property;
418 paint->max_ascent = ascent;
419 paint->max_descent = descent;
420 paint->backtabs = NULL;
421 paint->highlight = (Boolean)highlight;
422 paint->length = 1;
423 paint->text = XtMalloc(1);
424 paint->text[0] = (char)c;
533 XawTextPaintStruct *paint = XtNew(XawTextPaintStruct);
535 paint->next = sink->text_sink.paint->paint;
536 sink->text_sink.paint->paint = paint;
537 paint->x = x;
538 paint->y = y + ascent;
539 paint->property = NULL;
540 paint->max_ascent = ascent;
541 paint->max_descent = descent;
542 paint->backtabs = NULL;
543 paint->highlight = (Boolean)highlight;
549 if ((paint->property = XawTextSinkGetProperty((Widget)sink,
551 (paint->property->mask & XAW_TPROP_FONT))
552 font = paint->property->font;
572 paint->text = XtMalloc((Cardinal)(bufsiz = (int)(pos - tmp + 4)));
573 paint->length = 0;
583 if ((paint->length + 4) > (unsigned)bufsiz)
584 paint->text = XtRealloc(paint->text, (Cardinal)(bufsiz += 32));
585 paint->text[paint->length] = (char)c;
591 x += XTextWidth(font, paint->text, (int)paint->length);
595 if (!highlight && (paint->property &&
596 (paint->property->mask & XAW_TPROP_BACKGROUND))) {
600 XmuAreaOr(sink->text_sink.paint->clip, &area);
605 XmuAreaOr(sink->text_sink.paint->clip, &area);
607 if (paint->backtabs == NULL)
608 paint->backtabs = XmuCreateArea();
611 XmuAreaOr(paint->backtabs, &area);
617 if (!sink->text_sink.paint->hightabs)
618 sink->text_sink.paint->hightabs =
620 XmuAreaOr(sink->text_sink.paint->hightabs, &area);
623 XmuAreaOr(sink->text_sink.paint->clip, &area);
627 paint->width = segment.x2 - segment.x1;
630 if (paint->length == 0) {
631 paint->x = x;
634 paint->text = XtRealloc(paint->text, paint->length);
635 property = paint->property;
636 paint = XtNew(XawTextPaintStruct);
637 paint->next = sink->text_sink.paint->paint;
638 sink->text_sink.paint->paint = paint;
639 paint->x = x;
640 paint->y = y + ascent;
641 paint->property = property;
642 paint->max_ascent = ascent;
643 paint->max_descent = descent;
644 paint->backtabs = NULL;
645 paint->highlight = (Boolean)highlight;
646 paint->text = XtMalloc((Cardinal)(bufsiz = (int)(pos - tmp - length +
648 paint->length = 0;
654 paint->text[paint->length++] = '\\';
655 paint->text[paint->length++] = (char)(((c >> 6) & 7) + '0');
656 paint->text[paint->length++] = (char)(((c >> 3) & 7) + '0');
657 paint->text[paint->length] = (char)((c & 7) + '0');
661 paint->text[paint->length++] = '^';
662 paint->text[paint->length] = (char)(c == 0177 ? '?' : c);
666 paint->text[paint->length] = ' ';
668 paint->length++;
672 x += XTextWidth(font, paint->text, (int)paint->length);
676 /*if (!highlight || (paint->property &&
677 (paint->property->mask & XAW_TPROP_BACKGROUND))) {
681 XmuAreaOr(sink->text_sink.paint->clip, &area);
686 XmuAreaOr(sink->text_sink.paint->clip, &area);
692 XmuAreaOr(sink->text_sink.paint->clip, &area);
696 paint->width = x - segment.x1;
738 XawTextPaintList *list = sink->text_sink.paint;
739 XawTextPaintStruct *paint = list->paint;
762 if (paint && paint->next) {
766 while (paint) {
767 paint = paint->next;
772 paint = list->paint;
773 while (paint) {
774 paints[i++] = paint;
775 paint = paint->next;
779 list->paint = paints[0];
802 paint = list->paint;
806 while (paint) {
807 if (paint->property && (paint->property->mask & XAW_TPROP_BACKGROUND)) {
808 if (property != paint->property) {
813 property = paint->property;
824 rects[i_rects].x = (short)paint->x;
825 rects[i_rects].y = (short)(paint->y - font->ascent);
826 rects[i_rects].width = (unsigned short)paint->width;
829 if (paint->backtabs) {
830 for (scan = paint->backtabs->scanline; scan && scan->next;
846 paint = paint->next;
851 paint = list->paint;
853 while (paint) {
854 if (paint->highlight) {
861 rects[i_rects].x = (short)paint->x;
862 rects[i_rects].y = (short)(paint->y - paint->max_ascent);
863 rects[i_rects].width = (unsigned short)paint->width;
864 rects[i_rects++].height = (unsigned short)(paint->max_ascent + paint->max_descent + 1);
866 paint = paint->next;
892 paint = list->paint;
893 if (paint && (property = paint->property) == NULL) {
896 if (!paint->highlight)
902 while (paint) {
903 if (!highlight && paint->highlight)
905 if (highlight || paint->highlight || paint->property != property) {
906 if (!paint->property || !(paint->property->mask & XAW_TPROP_FONT))
909 font = paint->property->font;
911 if (!paint->highlight) {
912 if (!paint->property ||
913 !(paint->property->mask & XAW_TPROP_FOREGROUND))
918 paint->property->foreground);
920 highlight = paint->highlight;
921 property = paint->property;
924 if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) {
925 XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y,
926 paint->text, (int)paint->length);
935 XDrawLine(XtDisplay(ctx), XtWindow(ctx), gc, paint->x,
936 paint->y + property->underline_position,
937 paint->x + paint->width,
938 paint->y + property->underline_position);
947 XDrawLine(XtDisplay(ctx), XtWindow(ctx), gc, paint->x,
948 paint->y - (font->ascent>>1) + (font->descent>>1),
949 paint->x + paint->width,
950 paint->y - (font->ascent>>1) + (font->descent>>1));
955 paint = paint->next;
960 paint = list->bearings;
961 while (paint) {
962 if (paint->highlight)
964 if (!paint->property || !(paint->property->mask & XAW_TPROP_FONT))
967 font = paint->property->font;
969 if (!paint->highlight) {
970 if (!paint->property ||
971 !(paint->property->mask & XAW_TPROP_FOREGROUND))
974 XSetForeground(XtDisplay(ctx), gc, paint->property->foreground);
976 if (paint->x < XtWidth(ctx) && paint->x + paint->width > 0) {
978 .x = (short)(paint->x + paint->width),
979 .width = (unsigned short)(XawAbs(paint->width)), /* more than enough */
980 .y = (short)(paint->y - font->ascent),
981 .height = (unsigned short)((paint->y - font->ascent) +
986 XDrawString(XtDisplay(ctx), XtWindow(ctx), gc, paint->x, paint->y,
987 paint->text, (int)paint->length);
989 paint = paint->next;
1000 * gc - gc to paint text with
1001 * x - location to paint the text
1003 * buf - buffer and length of text to paint.