Annotation of researchv10dc/630/man/src/p_man/man3/bitblt.3r, revision 1.1

1.1     ! root        1: .TH BITBLT 3R "630 MTG"
        !             2: .XE "bitblt()"
        !             3: .SH NAME
        !             4: bitblt \- bit-block transfer
        !             5: .SH SYNOPSIS
        !             6: .B #include <dmd.h>
        !             7: .sp
        !             8: \f3void bitblt (sb, r, db, p, f)\f1
        !             9: .br
        !            10: .B Bitmap \(**sb, \(**db;
        !            11: .br
        !            12: .B Rectangle r;
        !            13: .br
        !            14: .B Point p;
        !            15: .br
        !            16: .B Code f;
        !            17: .SH DESCRIPTION
        !            18: The
        !            19: .I bitblt
        !            20: function
        !            21: copies the data from Rectangle
        !            22: .I r
        !            23: in Bitmap
        !            24: .I sb
        !            25: to the congruent Rectangle with origin
        !            26: .I p
        !            27: in Bitmap
        !            28: .IR db .
        !            29: Copy is specified by the function Code
        !            30: .IR f .
        !            31: .PP
        !            32: The source and destination Bitmaps may be the same or different and
        !            33: the source and destination Rectangles may even overlap;
        !            34: .I bitblt
        !            35: always does the assignments in the correct order.
        !            36: .SH EXAMPLES
        !            37: The following subroutine paints a mouse icon into the upper left corner
        !            38: of the applications window.
        !            39: .PP
        !            40: .RS 3
        !            41: .ft CM
        !            42: .nf
        !            43: .S -4
        !            44: unsigned short mouseicon[] = {
        !            45:         0x0000, 0x0000, 0x03E0, 0x17F0,
        !            46:         0x3FF0, 0x5FFE, 0xFFF1, 0x0421,
        !            47:         0x0002, 0x00FC, 0x0100, 0x0080,
        !            48:         0x0040, 0x0080, 0x0000, 0x0000,
        !            49: };
        !            50: 
        !            51: Bitmap mousemap = {
        !            52:        (Word *)mouseicon,
        !            53:        1,
        !            54:        (short)0, (short)0, (short)16, (short)16,
        !            55:        (char *)0
        !            56: };
        !            57: 
        !            58: paintmouse()
        !            59: {
        !            60:        bitblt(&mousemap, mousemap.rect, &display,
        !            61:                   Drect.origin, F_XOR);
        !            62: }
        !            63: .fi
        !            64: .ft R
        !            65: .RE
        !            66: .S +4
        !            67: .bp
        !            68: .PP
        !            69: The following subroutine paints the character \fIc\fR of font
        !            70: \fI\(**ffont\fR into the upper left corner of the applications window.
        !            71: This is similar to the library function
        !            72: .IR string,
        !            73: which paints strings of characters.
        !            74: .PP
        !            75: .RS 3
        !            76: .ft CM
        !            77: .nf
        !            78: .S -4
        !            79: #include <font.h>
        !            80: 
        !            81: character(ffont, c)
        !            82: Font *ffont;
        !            83: char c;
        !            84: {
        !            85:        Fontchar *fchar;
        !            86:        Rectangle r;
        !            87:        Rectangle fRect();
        !            88: 
        !            89:        fchar = ffont->info + c;
        !            90:        r = fRect(fchar->x, 0, (fchar+1)->x,
        !            91:                   ffont->height);
        !            92:        bitblt(ffont->bits, r, &display,
        !            93:                   Drect.origin, F_STORE);
        !            94: }
        !            95: .fi
        !            96: .ft R
        !            97: .RE
        !            98: .S +4
        !            99: .PP
        !           100: The following subroutine scrolls a Rectangle
        !           101: .I r
        !           102: in a Bitmap
        !           103: .I \(**b
        !           104: by
        !           105: .I n
        !           106: pixels.
        !           107: .PP
        !           108: .RS 3
        !           109: .ft CM
        !           110: .nf
        !           111: .S -2
        !           112: scroll(b, r, n)
        !           113: Bitmap *b;
        !           114: Rectangle r;
        !           115: {
        !           116:      Rectangle s;
        !           117: 
        !           118:      s = r;
        !           119:      s.origin.y += n; /* scroll up */
        !           120:      bitblt (b, s, b, r.origin, F_STORE);
        !           121:      s.origin.y = r.corner.y - n; /* clear bottom */
        !           122:      rectf (b, s, F_CLR);
        !           123: }
        !           124: .fi
        !           125: .ft R
        !           126: .RE
        !           127: .S +2
        !           128: .SH SEE ALSO
        !           129: structures(3R), string(3R).

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.