wnseto2o是什么意思思

SetROP2_百度百科
本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来吧!
SetROP2(int nDrawMode)主要用于设定当前的。R2_NOT就是取反的意思,即前景色为的反色,经常用R2_NOT来画橡皮线,因为两次取反可以还原背景色。:int SetROP2( HDC hdc, int fnDrawMode);:成功后返回调用前的模式,调用失败则返回零。
用于设定当前的。R2_NOT就是取反的意思,即前景色为的,经常用R2_NOT来画橡皮线,因为两次取反可以还原背景色。
函数的主要的作用
根据nDrawMode设置的方式重新设定绘图的方式,下面就不同的nDrawMode值具体解释绘图模式是如何改变的。
首先就nDrawMode的取值有以下的情况:
1、R2_BLACK//Pixel is always black. 所有绘制出来的像素为黑色
2、R2_WHITE//Pixel is always white. 所有绘制出来的像素为白色
3、R2_NOP//Pixel remains unchanged. 任何绘制将不改变当前的状态
4、R2_NOT//Pixel is the inverse of the screen color. 当前绘制的像素值设为屏幕像素值的反,这样可以覆盖掉上次的绘图,(自动擦除上次绘制的图形)
5、R2_COPYPEN//Pixel is the pen color. 使用当前的画笔的颜色
6、R2_NOTCOPYPEN//Pixel is the inverse of the pen color. 当前画笔的反色
//下面是当前画笔的颜色和屏幕色的组合运算得到的绘图模式。
7、R2_MERGEPENNOT//Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (NOT screen pixel) OR pen). R2_COPYPEN和R2_NOT的并集
8、R2_MASKPENNOT//Pixel is a combination of the colors common to both the pen and the inverse of the screen (final pixel = (NOT screen pixel) AND pen). R2_COPYPEN和R2_NOT的交集
9、R2_MERGENOTPEN//Pixel is a combination of the screen color and the inverse of the pen color (final pixel = (NOT pen) OR screen pixel). R2_NOTCOPYPEN和屏幕像素值的并集
10、R2_MASKNOTPEN//Pixel is a combination of the colors common to both the screen and the inverse of the pen (final pixel = (NOT pen) AND screen pixel).R2_NOTCOPYPEN和屏幕像素值的交集
11、R2_MERGEPEN//Pixel is a combination of the pen color and the screen color (final pixel = pen OR screen pixel). R2_COPYPEN和屏幕像素值的
12、R2_NOTMERGEPEN//Pixel is the inverse of the R2_MERGEPEN color (final pixel = NOT(pen OR screen pixel)). R2_MERGEPEN的反色
13、R2_MASKPEN//Pixel is a combination of the colors common to both the pen and the screen (final pixel = pen AND screen pixel). R2_COPYPEN和屏幕像素值的交集
14、R2_NOTMASKPEN//Pixel is the inverse of the R2_MASKPEN color (final pixel = NOT(pen AND screen pixel)). R2_MASKPEN的反色
15、R2_XORPEN//Pixel is a combination of the colors that are in the pen or in the screen, but not in both (final pixel = pen XOR screen pixel). R2_COPYPEN和屏幕像素值的
16、R2_NOTXORPEN//Pixel is the inverse of the R2_XORPEN color (final pixel = NOT(pen XOR screen pixel)). R2_XORPEN的反色
总之,上述api的一个作用是在需要改变绘图的模式时,不需要重新设置画笔,只需要设置不同的绘图的模式即可达到相应的目的。
程序橡皮筋绘图程序的使用实例:
void CXXXView::(UINT nFlags, CPoint point)
// 按下左键移动开始画图
if (nFlags == MK_LBUTTON)
// 创建画笔(0x00, 0x00, 0xFF)
HPEN hPen = ::(PS_SOLID, m_PenWidth, RGB(0x00, 0x00, 0xFF));
// 使用画笔
::(m_hMemDC, hPen);
//设置系统色彩模式取反色
int oldRop=::SetROP2(m_hMemDC,R2_NOTXORPEN);
::(m_hMemDC,m_pOrigin.x,m_pOrigin.y, NULL);
::(m_hMemDC, m_pPrev.x,m_pPrev.y);
//恢复系统默认色彩模式
::SetROP2(m_hMemDC,oldRop);
::MoveToEx(m_hMemDC, m_pOrigin.x, m_pOrigin.y, NULL);
::LineTo(m_hMemDC, point.x, point.y);SetCapture_百度百科
SetCapture
本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来吧!
函数功能:该函数在属于当前线程的指定窗口里设置鼠标捕获。一旦窗口捕获了鼠标,所有鼠标输入都针对该窗口,无论光标是否在窗口的边界内。同一时刻只能有一个窗口捕获鼠标。如果鼠标光标在另一个线程创建的窗口上,只有当按下时系统才将鼠标输入指向指定的窗口。
作用及参数
:HWND SetCapture(HWND hwnd);
:当前线程里要捕获鼠标的。
返回值:返回值是上次捕获鼠标的窗口句柄。如果不存在那样的句柄,返回值是。
备注:只有前台窗口才能捕获鼠标。如果一个后台窗口想捕获鼠标,则该窗口仅为其光标热点在该窗口可见部份的鼠标事件接收消息。另外,即使前台窗口已捕获了鼠标,用户也可点击另一个窗口,将其调入前台。当一个窗口不再需要所有的鼠标输入时,创建该窗口的线程应当调用函数来释放鼠标。此函数不能被用来捕获另一进程的鼠标输入。
Windows 95:调用SetCapture会引起失去鼠标捕获的窗口接收一个WM_CAPTURECHANGED消息。
速查:头文件:Winuser.h:输入库:user32.lib。
鼠标捕获(setCapture)作用是将鼠标事件捕获到当前文档的指定的对象。这个对象会为当前应用程序或整个系统接收所有鼠标事件。
setCapture捕获以下鼠标事件:onmousedown、onmouseup、onclick、ondblclick、onmouseover和onmouseout。
程序中主要是要捕获onmousemove和onmouseup事件。
的介绍中还说到setCapture有一个参数,用来设置在容器内的鼠标事件是否都被容器捕获。
容器就是指调用setCapture的对象,大概意思就是:
参数为true时(默认)容器会捕获容器内所有对象的鼠标事件,即容器内的对象不会触发鼠标事件(跟容器外的对象一样);
参数为时容器不会捕获容器内对象的鼠标事件,即容器内的对象可以正常地触发事件和取消冒泡。WNINPUT(5WN) manual page
noun.suffix , verb.suffix , adj.suffix , adv.suffix
- WordNet lexicographer
files that are input to
WordNet's source files
are written by lexicographers.
They are the product of a detailed relational
analysis of lexical semantics: a variety of lexical and semantic relations
are used to represent the organization of lexical knowledge.
of building blocks are distinguished in the source files: word forms and
word meanings.
Word forms are represented in their
word meanings are represented by synonym sets (synset s) - lists of synonymous
word forms that are interchangeable in some context.
Two kinds of relations
are recognized: lexical and semantic.
Lexical relations hold between word
semantic relations hold between word meanings.
Lexicographer files
correspond to the syntactic categories implemented in WordNet - noun, verb,
adjective and adverb.
All of the synsets in a lexicographer file are in
the same syntactic category.
Each synset consists of a list of synonymous
words or collocations (eg. "fountain pen" , "take in" ), and pointers that
describe the relations between this synset and other synsets.
These relations
include (but are not limited to) hypernymy/hyponymy, antonymy, entailment,
and meronymy/holonymy.
A word or collocation may appear in more than one
synset, and in more than one part of speech.
Each use of a word in a synset
represents a sense of that word in the part of speech corresponding to
the synset.
Adjectives may be organized into clusters containing head
synsets and satellite synsets.
Adverbs generally point to the adjectives
from which they are derived.
for a glossary of WordNet
terminology and a discussion of the database's content and logical organization.
The names of the lexicographer files are of
pos.suffix
is either noun , verb , adj
may be used to organize groups of synsets into different files,
for example noun.animal
and noun.plant .
for a list of
lexicographer file names that are used in building WordNet.
are used to represent the relations between the words in one synset and
Semantic pointers represent relations between word meanings,
and therefore pertain to all of the words in the source and target synsets.
Lexical pointers represent relations between word forms, and pertain
only to specific words in the source and target synsets.
The following
pointer types are usually used to indicate lexical relations: Antonym,
Pertainym, Participle, Also See, Derivationally Related.
The remaining
pointer types are generally used to represent semantic relations.
A relation
from a source to a target synset is formed by specifying a word from the
target synset in the source synset, followed by the pointer_symbol
indicating
the pointer type.
The location of a pointer within a synset defines it
as either lexical or semantic.
The Lexicographer File Format
describes the syntax for entering a semantic pointer, and Word Syntax
describes the syntax for entering a lexical pointer.
Although there
are many pointer types, only certain types of relations are permitted
between synsets of each syntactic category.
The pointer_symbol s for nouns
& &Antonym
& &Hypernym
& &Instance Hypernym
& &Hyponym
& &Instance
& &Member holonym
& &Substance holonym
& &Part holonym
& &Member meronym
& &Substance meronym
& &Part meronym
& &Attribute
& &Derivationally related form & & & &
& &Domain of synset - TOPIC
& &Member of this
domain - TOPIC
& &Domain of synset - REGION
& &Member of this domain - REGION
& &Domain of synset - USAGE
& &Member of this domain - USAGE
The pointer_symbol
s for verbs are:
& &Antonym
& &Hypernym
& &Hyponym
& &Entailment
& &Also see
& &Verb Group
& &Derivationally related form & & & &
& &Domain of
synset - TOPIC
& &Domain of synset - REGION
& &Domain of synset - USAGE
The pointer_symbol s for adjectives are:
& &Antonym
& &Similar to
& &Participle of verb
& &Pertainym (pertains to noun)
& &Attribute
& &Domain of synset - TOPIC
& &Domain of synset - REGION
of synset - USAGE
The pointer_symbol s for adverbs are:
& &Antonym
& &Derived from adjective
& &Domain of synset - TOPIC
& &Domain of synset
& &Domain of synset - USAGE
Many pointer types are reflexive,
meaning that if a synset contains a pointer to another synset, the other
synset should contain a corresponding reflexive pointer.
automatically
inserts missing reflexive pointers for the following pointer types:
Instance Hyponym
Instance Hypernym
Instance Hypernym
Instance Hyponym
Similar to
Similar to
Verb Group
Verb Group
Derivationally
Derivationally Related
Domain of synset
Member of Doman
Each verb synset contains a list of generic sentence frames
illustrating the types of simple sentences in which the verbs in the synset
can be used.
For some verb senses, example sentences illustrating actual
uses of the verb are provided.
(See Verb Example Sentences
Whenever there is no example sentence, the generic sentence frames specified
by the lexicographer are used.
The generic sentence frames are entered
in a synset as a comma-separated list of integer frame numbers.
The following
list is the text of the generic frames, preceded by their frame numbers:
1 & &Something ----s
2 & &Somebody ----s
3 & &It is ----ing
4 & &Something is ----ing PP
5 & &Something
----s something Adjective/Noun
6 & &Something ----s Adjective/Noun
7 & &Somebody ----s Adjective
8 & &Somebody ----s something
9 & &Somebody ----s somebody
10 & &Something ----s somebody
11 & &Something ----s something
12 & &Something ----s to somebody
13 & &Somebody ----s on something
14 & &Somebody ----s somebody something
15 & &Somebody ----s something to somebody
16 & &Somebody ----s something from somebody
17 & &Somebody ----s somebody with something
18 & &Somebody ----s somebody of something
19 & &Somebody ----s something on somebody
20 & &Somebody ----s somebody PP
21 & &Somebody ----s something PP
22 & &Somebody ----s PP
23 & &Somebody's (body part) ----s
24 & &Somebody ----s somebody to INFINITIVE
25 & &Somebody
----s somebody INFINITIVE
26 & &Somebody ----s that CLAUSE
27 & &Somebody ----s to somebody
28 & &Somebody ----s to INFINITIVE
29 & &Somebody ----s whether INFINITIVE
30 & &Somebody
----s somebody into V-ing something
31 & &Somebody ----s something with something
32 & &Somebody ----s INFINITIVE
33 & &Somebody ----s VERB-ing
34 & &It ----s that CLAUSE
35 & &Something
----s INFINITIVE
Synsets are entered one per
line, and each line is terminated with a newline character.
A line containing
a synset may be as long as necessary, but no newlines can be entered within
Within a synset, spaces or tabs may be used to separate entities.
Items enclosed in italicized square brackets may not be present.
general synset syntax is:
&&words&&pointers&&
Synsets of this form are valid for all syntactic categories except
verb, and are referred to as basic synsets.
At least one word
and a gloss
are required to form a valid synset.
Pointers entered following all the
in a synset represent semantic relations between all the words
in the source and target synsets.
For verbs, the basic synset syntax is
defined as follows:
&&words&&pointers&&frames&&
Adjective may be organized into clusters containing one or more head
synsets and optional satellite synsets.
Adjective clusters are of the
head synset
[satellite synsets]
[additional head/satellite
Each adjective cluster is enclosed in square brackets,
and may have one or more parts.
Each part consists of a head synset and
optional satellite synsets that are conceptually similar to the head synset's
Parts of a cluster are separated by one or more hyphens (- ) on
a line by themselves, with the terminating square bracket following the
last synset.
Head and satellite synsets follow the syntax of basic synsets,
however a "Similar to" pointer must be specified in a head synset for
each of its satellite synsets.
Most adjective clusters contain two antonymous
for a discussion of adjective clusters, and Special
Adjective Syntax
for more information on adjective cluster syntax.
for relational adjectives (pertainyms) and participial adjectives do not
adhere to the cluster structure.
They use the basic synset syntax.
can be entered in a lexicographer file by enclosing the text of the comment
in parentheses.
Note that comments cannot
appear within a synset, as
parentheses within a synset have an entirely different meaning (see Gloss
However, entire synsets (or adjective clusters) can be "commented
out" by enclosing them in parentheses.
This is often used by the lexicographers
to verify the syntax of files under development or to leave a note to
oneself while working on entries.
A synset must have at least
one word, and the words of a synset must appear after the opening brace
and before any other synset constructs. A word may be entered in either
the simple word or word/pointer syntax.
A simple word is of the form:
may be entered in any combination
of upper and lower case unless it is in an adjective cluster.
A collocation
is entered by joining the individual words with an underscore character
(_ ). Numbers (integer or real) may be entered, either by themselves or
as part of a word string, by following the number with a double quote
Special Adjective Syntax
for a description of adjective clusters
and markers.
may be followed by an integer lex_id
The lex_id
is used to distinguish different senses of the same word
within a lexicographer file.
The lexicographer assigns lex_id
usually in ascending order, although there is no requirement that the
numbers be consecutive.
The default is 0 , and does not have to be specified.
must be used on pointers if the desired sense has a non-zero
in its synset specification.
Word/pointer syntax is of the form:
&&pointers&&
This syntax
is used when one or more pointers correspond only to the specific word
in the word/pointer set, rather than all the words in the synset, and
represents a lexical relation.
Note that a word/pointer set appears within
a synset, therefore the square brackets used to enclose it are treated
differently from those used to define an adjective cluster.
Only one word
can be specified in each word/pointer set, and any number of pointers
may be included.
A synset can have any number of word/pointer sets.
is treated by
essentially as a word , so they all must appear
before any synset pointers
representing semantic relations.
For verbs,
the word/pointer syntax is extended in the following manner to allow the
user to specify generic sentence frames that, like pointers, correspond
only to a specific word, rather than all the words in the synset.
case, pointers
are optional.
&&[pointers]&&frames&&
Pointers are optional in synsets.
If a pointer is specified
outside of a word/pointer set, the relation is applied to all of the words
in the synset, including any words specified using the word/pointer syntax.
This indicates a semantic relation between the meanings of the words
in the synsets.
If specified within a word/pointer set, the relation corresponds
only to the word in the set and represents a lexical relation.
is of the form:
[lex_filename :
]word[lex_id] , pointer_symbol
[lex_filename :
]word[lex_id] ^ word[lex_id] , pointer_symbol
For pointers, word
indicates a word in another synset.
When the second
form of a pointer is used, the first word
indicates a word in a head
synset, and the second is a word in a satellite of that cluster.
may be followed by a lex_id
that is used to match the pointer to the
correct target synset.
The synset containing word
may reside in another
lexicographer file.
In this case, word
is preceded by lex_filename
See Pointers
for a list of pointer_symbol s and their meanings.
Frame numbers corresponding to generic sentence
frames must be entered in each verb synset.
If a frame list is specified
outside of a word/pointer set, the verb frames in the list apply to all
of the words in the synset, including any words specified using the word/pointer
If specified within a word/pointer set, the verb frames in the
list correspond only to the word in the set.
A frame number list is entered
as follows:
frames: &&f_num [, f_num...]
Where f_num
specifies a generic
frame number. See Verb Frames
for a list of generic sentences and their
corresponding frame numbers.
A gloss is included in all synsets.
The lexicographer may enter a text string of any length desired.
is simply a string enclosed in parentheses with no embedded carriage returns.
It provides a definition of what the synset represents and/or example
sentences.
The syntax for representing antonymous
adjective synsets requires several additional conditions.
The first word
of a head synset must
be entered in upper case, and can be thought of
as the head word of the head synset.
part of a pointer from
one head synset to another head synset within the same cluster (usually
an antonym) must also be entered in upper case.
Usually antonymous adjectives
are entered using the word/pointer syntax described in Word Syntax
indicate a lexical relation.
There is no restriction on the number of
parts that a cluster may have, and some clusters have three parts, representing
antonymous triplets, such as solid , liquid , and gas .
A cross-cluster
pointer may be specified, allowing a head or satellite synset to point
to a head synset in a different cluster.
A cross-cluster pointer is indicated
by entering the word
part of the pointer in upper case.
An adjective
may be annotated with a syntactic marker indicating a limitation on the
syntactic position the adjective may have in relation to noun that it
If so marked, the marker appears between the word and its following
If a lex_id
is specified, the marker immediately follows it.
syntactic markers are:
& &predicate position
& &prenominal (attributive)
& &immediately postnominal position & & & &
(Note that
these are hypothetical examples not found in the WordNet lexicographer
Sample noun synsets:
{ canine, [ dog1, cat,! ] pooch, canid,@
{ collie, dog1,@ (large multi-colored dog with pointy nose) }
hunting_dog, pack,#m dog1,@ }
Sample verb synsets:
{ [ confuse,
clarify,! frames: 1 ] blur, obscure, frames: 8, 10 }
{ [ clarify, confuse,!
] make_clear, interpret,@ frames: 8 }
{ interpret, construe, understand,@
frames: 8 }
Sample adjective clusters:
{ [ HOT, COLD,! ] lukewarm(a),
TEPID,^ (hot to the touch) }
{ [ COLD, HOT,! ] frigid, (cold
to the touch) }
{ freezing, }
Sample adverb synsets:
{ [ basically,
adj.all:essential^basic,\ ] [ essentially, adj.all:basic^fundamental,\ ] ( by
one's very nature )}
{ pointedly, adj.all:pungent^pointed,\ }
{ [ badly,
adj.all:bad,\ well,! ] ill, ("He was badly prepared") }
C. (1998), ed. "WordNet: An Electronic Lexical Database" . MIT Press, Cambridge,}

我要回帖

更多关于 狗带是什么意思 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信