Lines Matching defs:attrib
545 const struct attrib {
566 const struct attrib *attrib;
567 for (attrib = attributes; attrib < attributes + NUMA(attributes);
568 attrib++) {
569 if (attrib->format == format) { break; }
571 if (attrib >= attributes + NUMA(attributes)) {
577 pixel = htonl((uint32_t) round((((1 << attrib->c1Size) - 1) * color.c1()))
579 - (attrib->c1Offset + attrib->c1Size)));
580 pixel |= htonl((uint32_t) round((((1 << attrib->c2Size) - 1) * color.c2()))
582 - (attrib->c2Offset + attrib->c2Size)));
583 pixel |= htonl((uint32_t) round((((1 << attrib->c3Size) - 1) * color.c3()))
585 - (attrib->c3Offset + attrib->c3Size)));
586 if (attrib->aSize) {
587 pixel |= htonl((uint32_t) round((((1 << attrib->aSize) - 1) * alpha))
589 - (attrib->aOffset + attrib->aSize)));
591 if (attrib->hostByteOrder) {
593 pixel >>= sizeof(pixel) * BITSPERBYTE - attrib->bytes * BITSPERBYTE;
606 const struct attrib {
635 const struct attrib *attrib;
636 for (attrib = attributes; attrib < attributes + NUMA(attributes);
637 attrib++) {
638 if (attrib->format == gBuf->getPixelFormat()) { break; }
640 if (attrib >= attributes + NUMA(attributes)) {
646 memmove(buf + ((gBuf->getStride() * attrib->bytes) * y)
647 + (attrib->bytes * x), &pixel, attrib->bytes);
794 const struct attrib {
816 const struct attrib *fromAttrib;
827 const struct attrib *toAttrib;