Toon posts:

[delphi] ROP_XOR rastermode

Pagina: 1
Acties:

Verwijderd

Topicstarter
Weet iemand wat dit betekend: ROP_XOR rastermode. Ik moet twee Bitbilts (screenshots) met elkaar vergelijken, en de verschillen vastleggen. Dit moet ik doen volgens iemand met ROP_XOR rastermode.

Maar voor zover ik weet en kan vinden, is dit alleen iets met het linux kernel. Ik heb gezocht in de win32 SDK, MSDN Library, Google, etc.

Kan iemand mij vertellen wat dat ROP_XOR rastermode betekend en hoe ik het kan raadplegen?

  • klinz
  • Registratie: Maart 2002
  • Laatst online: 10-08 15:44

klinz

weet van NIETS

Andere zoektermen gebruiken :-)

www.google.com/search?q=rop+xor+win32

Verwijderd

Topicstarter
Vindt al meer, maar nog steeds niet echt veel. Weet iemand hier wat meer van het vergelijken van 2 bitblt's met XOR ROP Rastermode?

  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Verwijderd schreef op 07 March 2003 @ 16:56:
Vindt al meer, maar nog steeds niet echt veel. Weet iemand hier wat meer van het vergelijken van 2 bitblt's met XOR ROP Rastermode?
Ja hoor dat weet ik. Ik zou mezelf zelfs expert op het gebied kunnen noemen. Ik weet echter ook 100% zeker dat jij totaal nergens naar gezocht hebt dus ik ben niet al te hard geneigd om hier een hoop kostbare tijd aan te spenderen. Ik zal stiekem een beetje helpen: als je in de docs van BitBlt simpelweg Ctrl-F doet en 'XOR' intypt kom je vanzelf uit bij SRCINVERT met als beschrijving:
Combines the colors of the source and destination rectangles by using the Boolean XOR operator.
Dit kun je echt onmogelijk gemist hebben als je gezocht had. Veel succes ermee, en als je een specifieke vraag hebt na zelf feitelijk wat geprobeerd te hebben help ik je wellicht wel verder.

Professionele website nodig?


  • Tomatoman
  • Registratie: November 2000
  • Laatst online: 23-08 22:26

Tomatoman

Fulltime prutser

Uitleg over de functie BitBlt:
A raster operation code determines how the colors of the pixels in the source are combined with the colors of the pixels in the destination. This parameter can be one value from the table.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Value       Description
BLACKNESS   Fills the pixels in the specified rectangle in the destination
        with the color in index 0 of the physical palette. By default,
        this color is black.
DSTINVERT   Inverts the colors of the pixels in the specified rectangle in
        the destination.
MERGECOPY   Combines the pixel colors of the source rectangle with the
        pixel colors of the pattern contained in the brush selected
        into the destination device context using the boolean AND
        operator.
MERGEPAINT  Inverts the pixel colors of the source rectangle and combines
        them with the pixel colors of the destination rectangle using
        the boolean OR operator.
NOTSRCCOPY  Inverts the pixel colors of the source rectangle and copies
        them into the destination rectangle.
NOTSRCERASE Combines the pixel colors of the source and destination
        rectangles using the boolean OR operator, then inverts the
        resulting color.
PATCOPY     Copies the pattern contained in the brush selected into the
        destination device context directly into the destination.
PATINVERT   Combines the pixel colors of the pattern contained in the
        brush selected into the destination device context with the
        colors of the pixels in the destination using the boolean XOR
        operator.
PATPAINT    Combines the colors of the pattern contained in the brush
        selected into the destination device context with the
        inverted pixel colors of the source rectangle using the
        boolean OR operator, then combines the result with the
        pixel colors of the destination rectangle using the boolean
        OR operator.
SRCAND      Combines the pixel colors of the source and destination
        rectangles using the boolean AND operator.
SRCCOPY     Copies the pixel colors of the source rectangle directly into
        the destination rectangle.
SRCERASE    Combines the pixel colors of the source rectangle with the
        inverted colors of the destination rectangle using the
        boolean AND operator.
SRCINVERT   Combines the pixel colors of the source and destination
        rectangles using the boolean XOR operator.
SRCPAINT    Combines the pixel colors of the source and destination
        rectangles using the boolean OR operator.
WHITENESS   Fills the pixels in the specified rectangle in the destination
        with the color in index 255 of the physical palette. By
        default, this color is white.
Waar jij op doelt, is waarschijnlijk SRCINVERT (of Source XOR Destination). Wat een XOR operatie doet is het volgende (uitgaande van zwart-witafbeeldingen):
  • Als een bepaalde pixel in bron A en bron B gelijk is, komt er een zwarte pixel in op die plaats in de gecombineerde afbeelding.
  • Als een bepaalde pixel in bron A en bron B ONgelijk is, komt er een witte pixel in op die plaats in de gecombineerde afbeelding.
Op de gecombineerde afbeelding verschijnt hierdoor vanzelf een wit plaatje van wat er verschillend is in beide bronafbeeldingen. Wat in beide bronafbeeldingen gelijk is, wordt zwart. Voor kleurenplaatjes is het iets ingewikkelder, maar het principe blijft hetzelfde.

Een goede grap mag vrienden kosten.