background image
C H A P T E R 1 0
Recognition: Advanced Topics
10-48
Summary of Advanced Topics in Recognition
// Positive offset (in pixels) from base
// to the top of an uppercase "X"
bigHeight:
int
,
// Positive offset (in pixels) from base
// to the bottom of a lowercase "g"
descent:
int
,
...}
// use w/ rcBaseInfo to define grids of input cells
rcGridInfo :=
{// all coordinates are global (screen) coordinates
// coord of left edge of upper-left box in grid
boxLeft:
int
,
// coord of right edge of upper-left box in grid
boxRight:
int
,
// distance in pixels from one boxLeft to next boxLeft
xSpace:
int
,
// coord of topmost edge of upper-left box in grid
boxTop:
int
,
// coord of bottom edge of upper-left box in grid
boxBottom:
int
,
// distance in pixels from one boxTop to next boxTop
ySpace:
int
}
ProtoCharEdit Template
10
aCharEditTemplate :=
{
format:
string
, // string array indexes or underscores
filters: [
str1
,
str2
, ...
strN
], // valid input values
string:
string
// initial string to display
// optional method you supply
// sets value of
charEditView
.text slot
SetupString: func (
str
) begin ... end,
// optional method you supply
// formats
charEditView
.text string for ext display
CleanupString: func (
str
)begin ... end
}
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна