Lines Matching defs:attrib
547 const struct attrib {
568 const struct attrib *attrib;
569 for (attrib = attributes; attrib < attributes + NUMA(attributes);
570 attrib++) {
571 if (attrib->format == format) { break; }
573 if (attrib >= attributes + NUMA(attributes)) {
579 pixel = htonl((uint32_t) round((((1 << attrib->c1Size) - 1) * color.c1()))
581 - (attrib->c1Offset + attrib->c1Size)));
582 pixel |= htonl((uint32_t) round((((1 << attrib->c2Size) - 1) * color.c2()))
584 - (attrib->c2Offset + attrib->c2Size)));
585 pixel |= htonl((uint32_t) round((((1 << attrib->c3Size) - 1) * color.c3()))
587 - (attrib->c3Offset + attrib->c3Size)));
588 if (attrib->aSize) {
589 pixel |= htonl((uint32_t) round((((1 << attrib->aSize) - 1) * alpha))
591 - (attrib->aOffset + attrib->aSize)));
593 if (attrib->hostByteOrder) {
595 pixel >>= sizeof(pixel) * BITSPERBYTE - attrib->bytes * BITSPERBYTE;
608 const struct attrib {
637 const struct attrib *attrib;
638 for (attrib = attributes; attrib < attributes + NUMA(attributes);
639 attrib++) {
640 if (attrib->format == gBuf->getPixelFormat()) { break; }
642 if (attrib >= attributes + NUMA(attributes)) {
648 memmove(buf + ((gBuf->getStride() * attrib->bytes) * y)
649 + (attrib->bytes * x), &pixel, attrib->bytes);
795 const struct attrib {
817 const struct attrib *fromAttrib;
828 const struct attrib *toAttrib;