am 2014-05-18 02:03 AM
am 2014-05-18 10:07 AM
am 2014-05-18 05:45 PM
am 2014-05-18 09:35 PM
! ==============================================================================
"drawStampLine":
! ------------------------------------------------------------------------------
! Input Parameters:
! maxStampWidth: Zone Stamp Width (length)
! currentPosY: Current Y Position of String (length)
! Output Parameters: none
! ==============================================================================
if iStyleType = STYLE_2 & bShowFrame then
pen framePen
line2 0, -currentPosY, maxStampWidth, -currentPosY
endif
return
! ==============================================================================
"drawHeightWithNum":
! ------------------------------------------------------------------------------
! Print Row - Only for Style 1
! -- doesnt use "printRow" subroutine like all the others --
! Input Parameters:
! General Parameters
! bMove2D: (GLOB_CONTEXT > 19)
! bMarker Use Marker (bool)
! currentPosY Current Y Position of String (length)
!
! Text Parameters Text Style Datas (Style Name, Height, Space, Font)
! textStyles[]
! textSpace[]
! textOffset[]
! textStyleFont[]:
!
! Text Row Parameters
! idx: Current Row Index (integer)
! rowStrings[][2]: Left String, Right String
! rowType[][4]: Row Type[1], Show Row[2], Unit Type[3], Row has Calculated Leght[4] (integer)
! rowValue[]: Quantity (real)
! rowWidth[][3]: Total, Left, Right (length)
!
! Output Parameters: none
! ==============================================================================
add2 maxStampWidth - _posXHeight + borderDistance, -(stampH/2-textSpace[TEXTSTYLE_DATA_LEFT])/2
markerPosX = 0
if bMarker then gosub "drawMarker"
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
textAlign = TEXTALIGN_LEFT
szPrefix = rowStrings[idx][1]
bShowUnit = 0
add2 markerwidth, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
pen SYMB_VIEW_PEN
gosub "callQuantity"
rectLength = rowWidth[idx][3] + markerwidth
if bMove2D then
rect2 -markerwidth, 0, -markerwidth+rectLength, -textSpace[TEXTSTYLE_DATA_LEFT]+2*textOffset[TEXTSTYLE_DATA_LEFT]
endif
del 2
return
! ==============================================================================
"drawMarker":
! ------------------------------------------------------------------------------
! Input Parameters:
! markerPosX: Marker X position (length)
! markerHeigth: Marker Height (length)
! currentPosY: Current Y Position of String (length)
! Output Parameters: none
! ==============================================================================
line_type 1
pen SYMB_VIEW_PEN
add2 markerPosX, -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+markerHeigth*1.3
poly2 3, 1+2+4,
0, 0,
markerHeigth/2, -markerHeigth/sqr(2),
markerHeigth, 0
del 1
line_type frameLineType
return
! ==============================================================================
!
! Calculation Subroutines
!
! ==============================================================================
! ==============================================================================
"calcOrDraw_None":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
groupWidth[orderIdx] = 0
groupLines[orderIdx] = 1
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT]
bHasFrame = 1
else
idx = ROW__NONE : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_ZoneName":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__ZONE_NAME__ZONE_NAME : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__ZONE_NAME__ZONE_NAME2 : idx =idx2 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2]
groupHeight[orderIdx] = rowHeight[idx1] + rowHeight[idx2]
bHasFrame = 0
else
idx = ROW__ZONE_NAME__ZONE_NAME : gosub "printRow"
idx = ROW__ZONE_NAME__ZONE_NAME2 : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_ZoneNumber":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__ZONE_NUMBER__ZONE_NO1 : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__ZONE_NUMBER__ZONE_NO2 : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__ZONE_NUMBER__ZONE_NO3 : idx =idx3 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__ZONE_NUMBER__ZONE_NO1 : gosub "printRow"
idx = ROW__ZONE_NUMBER__ZONE_NO2 : gosub "printRow"
idx = ROW__ZONE_NUMBER__ZONE_NO3 : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_ID":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__ID__CAT_ID : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__ID__ID : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__ID__SHORT_TITLE : idx =idx3 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__ID__CAT_ID : gosub "printRow"
idx = ROW__ID__ID : gosub "printRow"
idx = ROW__ID__SHORT_TITLE : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_Apartment":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__APARTMENT__APART_NAME : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__APARTMENT__APART_POS : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__APARTMENT__HOUSE_NUM : idx =idx3 : gosub "calcRowWidth"
idx4 = ROW__APARTMENT__FUNCTION : idx =idx4 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1], rowWidth[idx4][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2] + rowType[idx4][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__APARTMENT__APART_NAME : gosub "printRow"
idx = ROW__APARTMENT__APART_POS : gosub "printRow"
idx = ROW__APARTMENT__HOUSE_NUM : gosub "printRow"
idx = ROW__APARTMENT__FUNCTION : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_Finishing":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if bEnableRenovationSettings then
if phaseCalc then
idx1 = ROW__FINISHING__FLOOR : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__FINISHING__FLOOR__EXIST : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__FINISHING__WALL : idx =idx3 : gosub "calcRowWidth"
idx4 = ROW__FINISHING__CEILING : idx =idx4 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1], rowWidth[idx4][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2] + rowType[idx4][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__FINISHING__FLOOR : gosub "printRow"
idx = ROW__FINISHING__FLOOR__EXIST : gosub "printRow"
idx = ROW__FINISHING__WALL : gosub "printRow"
idx = ROW__FINISHING__CEILING : gosub "printRow"
endif
else
if phaseCalc then
idx1 = ROW__FINISHING__FLOOR : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__FINISHING__WALL : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__FINISHING__CEILING : idx =idx3 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__FINISHING__FLOOR : gosub "printRow"
idx = ROW__FINISHING__WALL : gosub "printRow"
idx = ROW__FINISHING__CEILING : gosub "printRow"
endif
endif
return
! ==============================================================================
"calcOrDraw_Height":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__HEIGHT__FLOOR : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__HEIGHT__ZONE : idx =idx2 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__HEIGHT__FLOOR : gosub "printRow"
idx = ROW__HEIGHT__ZONE : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_HeightAndNumber":
! ------------------------------------------------------------------------------
! Calculate and Print Row - Only for Style 1
! -- doesnt use "printRow" subroutine like all the others --
!
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
!
! if (phaseCalc == 0)
! bMarker Use Marker (bool)
! idx: Current Row Index (integer)
! rowStrings[][2]: Left String, Right String
! rowType[][4]: Show Row[2], Unit Type[3] (integer)
! rowValue[]: Quantity (real)
! maxStampWidth: Zone Stamp Width (length)
! bMove2D: (GLOB_CONTEXT > 19)
! currentPosY Current Y Position of String (length)
! Text Parameters Text Style Datas (Style Name, Height, Space, Font)
! rowType[][4]: Row Type[1], Show Row[2], Unit Type[3], Row has Calculated Leght[4] (integer)
! rowWidth[][3]: Total, Left, Right (length)
! rowValue[]: Quantity (real)
!
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Width (length)
! bHasFrame Group has Frame (bool)
!
! Group Width design (old function)
! Height Values align right with offset to the frame line, but align left for max string length of themself
! Numbers align left with offset to the frame line
! Group Height design : minimum 2 x Height Values Row Height when number`s on
! even if Height Values aren`t shown
! ==============================================================================
if phaseCalc then
idx1 = ROW__HEIGHT__FLOOR : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__HEIGHT__ZONE : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__ZONE_NUMBER__ZONE_NO1 : idx =idx3 : rowType[idx][1] = ROWTYPE_ZONENUM_HEIGHT : gosub "calcRowWidth"
idx4 = ROW__ZONE_NUMBER__ZONE_NO2 : idx =idx4 : rowType[idx][1] = ROWTYPE_ZONENUM_HEIGHT : gosub "calcRowWidth"
idx5 = ROW__ZONE_NUMBER__ZONE_NO3 : idx =idx5 : rowType[idx][1] = ROWTYPE_ZONENUM_HEIGHT : gosub "calcRowWidth"
_posXHeight = max(rowWidth[idx1][1], rowWidth[idx2][1])
_numZoneNumber = rowType[idx3][2] + rowType[idx4][2] + rowType[idx5][2]
groupWidth[orderIdx] = max( max(rowWidth[idx1][1], rowWidth[idx2][1]), max (rowWidth[idx3][1], rowWidth[idx4][1], rowWidth[idx5][1])) * 2
groupLines[orderIdx] = max(rowType[idx1][2] + rowType[idx2][2], rowType[idx3][2] + rowType[idx4][2] + rowType[idx5][2])
groupHeight[orderIdx] = max(2 * textSpace[TEXTSTYLE_DATA_LEFT] * (groupLines[orderIdx] > 0), _numZoneNumber * textSpace[TEXTSTYLE_TITLE])
bHasFrame = 1
else
if groupLines[orderIdx] then
fill fillType
pen framePen
line_type frameLineType
stampH = stampHeight[orderIdx][2]-stampHeight[orderIdx][1]
rect2 0, -currentPosY, maxStampWidth, -currentPosY-stampH
line2 maxStampWidth/2, -currentPosY, maxStampWidth/2, -currentPosY-stampH
line2 maxStampWidth/2, -currentPosY-stampH/2, maxStampWidth, -currentPosY-stampH/2
idx = ROW__HEIGHT__FLOOR
if rowType[idx][2] then
set fill 65
gosub "drawHeightWithNum"
endif
idx = ROW__HEIGHT__ZONE
if rowType[idx][2] then
set fill 64
add2 0, -stampH/2
gosub "drawHeightWithNum"
del 1
endif
nZoneNum = bShowZoneNum + bShowZoneNum2 + bShowZoneNum3
add2 borderDistance, -currentPosY - (stampH - nZoneNum * textSpace[TEXTSTYLE_TITLE]) / 2 - textOffset[TEXTSTYLE_TITLE]
for i = 1 to 3
if i = 1 then idx = ROW__ZONE_NUMBER__ZONE_NO1
if i = 2 then idx = ROW__ZONE_NUMBER__ZONE_NO2
if i = 3 then idx = ROW__ZONE_NUMBER__ZONE_NO3
if rowType[idx][2] then
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
pen SYMB_VIEW_PEN
gosub "makeParagraph"
richtext2 0, 0, "textBlock" + textStyleName
if bMove2D then
rect2 0, textOffset[TEXTSTYLE_TITLE], rowWidth[idx][2], -textSpace[TEXTSTYLE_TITLE] + textOffset[TEXTSTYLE_TITLE]
endif
add2 0, -textSpace[TEXTSTYLE_TITLE]
endif
next i
del 1 + nZoneNum
currentPosY = currentPosY + stampH
endif
endif
return
! ==============================================================================
"calcOrDraw_ZoneAreas":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if bEnableRenovationSettings then
if phaseCalc then
idx1 = ROW__ZONE_AREAS__MES_AREA : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__ZONE_AREAS__EXIST_AREA : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__ZONE_AREAS__MES_NET_AREA : idx =idx3 : gosub "calcRowWidth"
idx4 = ROW__ZONE_AREAS__VENT_AREA : idx =idx4 : gosub "calcRowWidth"
idx5 = ROW__ZONE_AREAS__REDUC_AREA : idx =idx5 : gosub "calcRowWidth"
idx6 = ROW__ZONE_AREAS__CALC_AREA : idx =idx6 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1], rowWidth[idx4][1], rowWidth[idx5][1], rowWidth[idx6][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2] + rowType[idx4][2] + rowType[idx5][2] + rowType[idx6][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__ZONE_AREAS__MES_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__EXIST_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__MES_NET_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__VENT_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__REDUC_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__CALC_AREA : gosub "printRow"
endif
else
if phaseCalc then
idx1 = ROW__ZONE_AREAS__MES_AREA : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__ZONE_AREAS__MES_NET_AREA : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__ZONE_AREAS__VENT_AREA : idx =idx3 : gosub "calcRowWidth"
idx4 = ROW__ZONE_AREAS__REDUC_AREA : idx =idx4 : gosub "calcRowWidth"
idx5 = ROW__ZONE_AREAS__CALC_AREA : idx =idx5 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1], rowWidth[idx4][1], rowWidth[idx5][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2] + rowType[idx4][2] + rowType[idx5][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__ZONE_AREAS__MES_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__MES_NET_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__VENT_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__REDUC_AREA : gosub "printRow"
idx = ROW__ZONE_AREAS__CALC_AREA : gosub "printRow"
endif
endif
return
! ==============================================================================
"calcOrDraw_WindowArea":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx = ROW__WINDOW_AREA__WINDOW_AREA : gosub "calcRowWidth"
groupWidth[orderIdx] = rowWidth[idx][1]
groupLines[orderIdx] = rowType[idx][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__WINDOW_AREA__WINDOW_AREA : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_Size":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx1 = ROW__SIZE__PERIMETER : idx =idx1 : gosub "calcRowWidth"
idx2 = ROW__SIZE__CEILING_H : idx =idx2 : gosub "calcRowWidth"
idx3 = ROW__SIZE__VOLUME : idx =idx3 : gosub "calcRowWidth"
groupWidth[orderIdx] = max (rowWidth[idx1][1], rowWidth[idx2][1], rowWidth[idx3][1])
groupLines[orderIdx] = rowType[idx1][2] + rowType[idx2][2] + rowType[idx3][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__SIZE__PERIMETER : gosub "printRow"
idx = ROW__SIZE__CEILING_H : gosub "printRow"
idx = ROW__SIZE__VOLUME : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_AreaCode":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx = ROW__AREA_CODE_GER__AREACODE : gosub "calcRowWidth"
groupWidth[orderIdx] = rowWidth[idx][1]
groupLines[orderIdx] = rowType[idx][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__AREA_CODE_GER__AREACODE : gosub "printRow"
endif
return
! ==============================================================================
"calcOrDraw_Onorm":
! ------------------------------------------------------------------------------
! Input Parameters:
! phaseCalc: Calculation Phase? (bool)
! orderIdx: Order Index
! Output Parameters: if (phaseCalc == 1)
! groupWidth[] Group Width (length)
! groupLines[] Group Lines Number (integer)
! groupHeight[] Group Height
! bHasFrame Group has Frame (bool)
! ==============================================================================
if phaseCalc then
idx = ROW__ONORM_AUT__ONORM : gosub "calcRowWidth"
groupWidth[orderIdx] = rowWidth[idx][1]
groupLines[orderIdx] = rowType[idx][2]
groupHeight[orderIdx] = textSpace[TEXTSTYLE_DATA_LEFT] * groupLines[orderIdx]
bHasFrame = 1
else
idx = ROW__ONORM_AUT__ONORM : gosub "printRow"
endif
return
! ==============================================================================
!
! General Subroutines
!
! ==============================================================================
! ==============================================================================
"callQuantity":
! ------------------------------------------------------------------------------
! Call Quantity Text Macro
! ------------------------------------------------------------------------------
! Input Parameters:
! modelToPaper: Scale (real)
! phaseCalc: Calculation Phase? (bool)
! unitValue Printed Unit Value (double)
! iUnitType Unit Type (integer) see "Units"
! textAlign Text Align (1 left, 3 right) (integer)
! szPrefix String Prefix value (±,-)
! bShowUnit Show Unit (bool)
! bShowSuperScript Show Superscrit (bool)
! Output Parameters:
! totalLength: Quantity Total Length (length)
! textboxHeight: Quantity Total Height (length)
! szExtraPrecision: Quantity Extra Precision (string)
! lengthOfIntegerPart: Length of Integer Part (length)
! lengthOfUnit: Length of Unit (length)
! ==============================================================================
mul2 modelToPaper, modelToPaper
call "quantity_text_writer" parameters lengthValue = unitValue,
iUnitType = iUnitType,
GS_iMarkerDir = 1,
horizontalAlignment = textAlign,
verticalAlignment = 2,
AC_TextFont = textStyleFont[TEXTSTYLE_UNIT],
AC_TextSize = textStyleSize[TEXTSTYLE_UNIT],
AC_TextStyle = textStyleCode[TEXTSTYLE_UNIT][idx],
szPrefix = szPrefix,
AC_Readable = 0,
gs_readable_angle = 90,
useLeadingAndDescent = 1,
bShowText = not(phaseCalc),
bShowUnit = bShowUnit,
bShowSuperScript = bShowSuperScript,
returned_parameters totalLength,
textboxHeight,
szExtraPrecision,
lengthOfIntegerPart,
lengthOfUnit
del 1
return
! ==============================================================================
"calcRowWidth":
! ------------------------------------------------------------------------------
! Calculation one row width, height, etc..
! ------------------------------------------------------------------------------
! Input Parameters:
! General Parameters
! bShowDimensionUnits: Show Dimension Unit (bool)
! frameDist: Frame Distance (length)
! frameDistHalf: Frame Distance /2 (length)
! bFixWidth Fixed frame distance (bool)
! bMarker Use Marker (bool)
!
! Text Parameters Text Style Datas (Style Name, Height, Space, Font)
! textStyles[]
! textSpace[]
! textOffset[]
! textStyleFont[]:
!
! Text Row Parameters
! idx: Current Row Index (integer)
! rowStrings[][2]: Left String, Right String
! rowType[][4]: Row Type[1], Show Row[2], Unit Type[3] (integer)
! ROWTYPE_NONE = 1
! ROWTYPE_1COL = 2
! ROWTYPE_2COL = 3
! ROWTYPE_2COL_BACK = 4
! ROWTYPE_2COL_UNIT = 5
! ROWTYPE_TITLE = 6
! ROWTYPE_ONORM = 7
! ROWTYPE_MEASUREDNET = 8
! ROWTYPE_LEVEL = 9
! ROWTYPE_ZONENUM_HEIGHT = 10
! rowValue[]: Quantity (real)
!
! Output Parameters:
! rowWidth[][3]: Total, Left, Right (length)
! rowType[][4]: Row has Calculated Leght[4] (integer)
! rowHeight[]: Row Heights (Only uses in Zone Name)
! bNormCustomString[]: Show Onorm Strings (bool)
! widthNormCustomString[]: Onorm String Width (length)
! ==============================================================================
szPrefix = ""
bShowUnit = bShowDimensionUnit[idx]
if rowType[idx][1] = ROWTYPE_NONE then
rowWidth[idx][3] = 0
rowWidth[idx][2] = 0
rowWidth[idx][1] = 0
return
endif
if rowType[idx][1] = ROWTYPE_1COL then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
rowWidth[idx][3] = 0
rowWidth[idx][2] = stw (rowStrings[idx][1])
if (rowWidth[idx][2]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] + frameDist ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_ZONENUM_HEIGHT then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_TITLE][idx]
rowWidth[idx][3] = 0
rowWidth[idx][2] = stw (rowStrings[idx][1])
if (rowWidth[idx][2]) < EPS then rowType[idx][2] = 0
_offset = frameDist/2 + borderDistance
rowWidth[idx][1] = ( rowWidth[idx][2] + _offset ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_2COL then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
rowWidth[idx][3] = stw (rowStrings[idx][2])
rowWidth[idx][2] = stw (rowStrings[idx][1])
if (rowWidth[idx][2] + rowWidth[idx][3]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] + rowWidth[idx][3] + frameDist ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_2COL_BACK then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
rowWidth[idx][3] = stw (rowStrings[idx][2])
rowWidth[idx][2] = stw (rowStrings[idx][1])
if (rowWidth[idx][2] + rowWidth[idx][3]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] + rowWidth[idx][3] + unitLengthMax + frameDist ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_LEVEL then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
szPrefix = rowStrings[idx][1]
bShowUnit = bShowDimensionUnit[idx]
gosub "callQuantity"
rowWidth[idx][3] = totalLength
rowWidth[idx][2] = markerwidth
if usedRows[orderIdx]= ORDER_HEIGHT_NUMBER then ! with Number in one box
_offset = frameDist/2 + borderDistance
else
_offset = frameDist
endif
rowWidth[idx][1] = ( rowWidth[idx][2] + rowWidth[idx][3] + _offset ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_2COL_UNIT | rowType[idx][1] = ROWTYPE_MEASUREDNET then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
szPrefix = ""
bShowUnit = bShowDimensionUnit[idx]
gosub "callQuantity"
rowWidth[idx][3] = totalLength + unitLength[rowType[idx][3]][2]
rowWidth[idx][2] = stw (rowStrings[idx][1])
rowWidth[idx][1] = ( rowWidth[idx][2] + rowWidth[idx][3] + frameDist ) * rowType[idx][2]
rowType[idx][4] = 1
endif
return
endif
if rowType[idx][1] = ROWTYPE_TITLE then
if rowType[idx][4] = 0 then
if bFixWidth then
if idx = ROW__ZONE_NAME__ZONE_NAME then
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = bFixWidth
gosub "makeParagraph"
n = REQUEST ("TEXTBLOCK_INFO", "textBlock" + textStyleName, widthTitleString, calcTitleHeightZoneName1)
calcTitleHeight = calcTitleHeightZoneName1
endif
if idx = ROW__ZONE_NAME__ZONE_NAME2 then
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = bFixWidth
gosub "makeParagraph"
n = REQUEST ("TEXTBLOCK_INFO", "textBlock" + textStyleName, widthTitleString, calcTitleHeightZoneName2)
calcTitleHeight = calcTitleHeightZoneName2
endif
rowWidth[idx][3] = 0
rowWidth[idx][2] = widthTitleString
if (rowWidth[idx][2]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] ) * rowType[idx][2]
rowHeight[idx] = (calcTitleHeight + 2*textOffset[TEXTSTYLE_TITLE]) * rowType[idx][2]
else
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = ""
_bFixWidth = bFixWidth
gosub "makeParagraph"
rowWidth[idx][3] = 0
rowWidth[idx][2] = stw (rowStrings[idx][1])
if (rowWidth[idx][2]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] ) * rowType[idx][2]
rowHeight[idx] = (textSpace[TEXTSTYLE_TITLE]) * rowType[idx][2]
endif
rowType[idx][4] = 1
endif
endif
if rowType[idx][1] = ROWTYPE_ONORM then
if rowType[idx][4] = 0 then
style textStyles[TEXTSTYLE_DATA_LEFT][idx]
nOnormData = 0
dim widthNormCustomString[17]
dim bNormCustomString[17]
dim normCustomString[17]
normCustomString[1] = normCustom1
normCustomString[2] = normCustom2
normCustomString[3] = normCustom3
normCustomString[4] = normCustom4
normCustomString[5] = normCustom5
normCustomString[6] = normCustom6
normCustomString[7] = normCustom7
normCustomString[8] = normCustom8
normCustomString[9] = normCustom9
normCustomString[10] = normCustom10
normCustomString[11] = normCustom11
normCustomString[12] = normCustom12
normCustomString[13] = normCustom13
normCustomString[14] = normCustom14
normCustomString[15] = normCustom15
normCustomString[16] = normCustom16
normCustomString[17] = normCustom17
for i = 1 to vardim1(normCustomString)
if normCustomString[i] <> "" & bShowOnormData then
bNormCustomString[i] = 1
nOnormData = nOnormData + 1
else
bNormCustomString[i] = 0
endif
next i
oNormMaxWidth = 0
for i = 1 to vardim1(normCustomString)
widthNormCustomString[i] = stw (normCustomString[i])
if widthNormCustomString[i] > oNormMaxWidth then oNormMaxWidth = widthNormCustomString[i]
next i
rowWidth[idx][3] = 0
rowWidth[idx][2] = oNormMaxWidth
rowType[idx][2] = nOnormData
if (rowWidth[idx][2] + rowWidth[idx][3]) < EPS then rowType[idx][2] = 0
rowWidth[idx][1] = ( rowWidth[idx][2] + rowWidth[idx][3] + frameDist ) * (rowType[idx][2] > eps)
rowType[idx][4] = 1
endif
return
endif
return
! ==============================================================================
"printRow":
! ------------------------------------------------------------------------------
! Draw one row text
! ------------------------------------------------------------------------------
! Input Parameters:
! General Parameters
! bShowDimensionUnits: Show Dimension Unit (bool)
! frameDistHalf: Frame Distance /2 (length)
! maxStampWidth: Zone Stamp Width (length)
! bMove2D: (GLOB_CONTEXT > 19)
! bMeasuredNetAreaCodeIsEmpty: Empty Measured Area (bool)
! bMarker Use Marker (bool)
! currentPosY Current Y Position of String (length)
! nRow: Current No. Row (integer)
!
! Text Parameters Text Style Datas (Style Name, Height, Space, Font)
! textStyles[]
! textSpace[]
! textOffset[]
! textStyleFont[]:
!
! Text Row Parameters
! idx: Current Row Index (integer)
! rowStrings[][2]: Left String, Right String
! rowType[][4]: Row Type[1], Show Row[2], Unit Type[3], Row has Calculated Leght[4] (integer)
! ROWTYPE_NONE = 1
! ROWTYPE_1COL = 2
! ROWTYPE_2COL = 3
! ROWTYPE_2COL_BACK = 4
! ROWTYPE_2COL_UNIT = 5
! ROWTYPE_TITLE = 6
! ROWTYPE_ONORM = 7
! ROWTYPE_MEASUREDNET = 8
! ROWTYPE_LEVEL = 9
! ROWTYPE_ZONENUM_HEIGHT = 10
! rowValue[]: Quantity (real)
! rowWidth[][3]: Total, Left, Right (length)
! rowHeight[]: Row Heights (Only uses in Zone Name)
! bNormCustomString[]: Show Onorm Strings (bool)
! widthNormCustomString[]: Onorm String Width (length)
!
! Output Parameters:
! currentPosY: Updated Y Position of String (length)
! nRow: Update No. Row (integer)
! ==============================================================================
if rowType[idx][2] then
textPen = SYMB_VIEW_PEN
if idx = ROW__ZONE_NAME__ZONE_NAME then textPen = _penZoneName
if idx = ROW__ZONE_NAME__ZONE_NAME2 then textPen = _pen2ndZoneNameLine
if idx = ROW__ZONE_AREAS__MES_AREA then textPen = _penMeasuredArea
if idx = ROW__ZONE_AREAS__EXIST_AREA then textPen = _penExistingArea
if idx = ROW__FINISHING__FLOOR then textPen = _penFloorFinish
if idx = ROW__FINISHING__FLOOR__EXIST then textPen = _penExistingFloorFinish
pen textPen
nRow = nRow + 1
if rowType[idx][1] = ROWTYPE_NONE then
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_1COL then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf + rowWidth[idx][2], -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_2COL then
if rowStrings[idx][1] = "" then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][2]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
rectLength = rowWidth[idx][1]
else
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
if iStyleType = STYLE_3 then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][2]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 rowWidth[idx][2]+frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
rectLength = rowWidth[idx][1]
else
textStyleName = textStyles[TEXTSTYLE_DATA_RIGHT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_RIGHT][idx]
stText = rowStrings[idx][2]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 maxStampWidth-frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
rectLength = maxStampWidth-frameDistHalf*2
endif
endif
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf + rectLength, -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_2COL_BACK then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
if iStyleType = STYLE_3 then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][2]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 rowWidth[idx][2]+frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
rectLength = rowWidth[idx][1]
else
textStyleName = textStyles[TEXTSTYLE_DATA_RIGHT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_RIGHT][idx]
stText = rowStrings[idx][2]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 maxStampWidth-frameDistHalf-unitLengthMax, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
rectLength = maxStampWidth-frameDistHalf*2
endif
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf + rectLength, -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_2COL_UNIT then
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
szPrefix = ""
bShowUnit = bShowDimensionUnit[idx]
if iStyleType = STYLE_3 then
add2 rowWidth[idx][2]-frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
textAlign = TEXTALIGN_LEFT
gosub "callQuantity"
rectLength = rowWidth[idx][1]
del 1
else
add2 maxStampWidth-frameDistHalf-unitLength[rowType[idx][3]][2], -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
textAlign = TEXTALIGN_RIGHT
gosub "callQuantity"
rectLength = maxStampWidth-frameDistHalf*2
del 1
endif
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf + rectLength, -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_LEVEL then
if iStyleType = STYLE_1 then ! Style 1 DONT use "printrow" subroutine anyway
markerPosX = borderDistance
else
markerPosX = frameDistHalf
endif
if idx = ROW__HEIGHT__FLOOR then set fill 65
if idx = ROW__HEIGHT__ZONE then set fill 64
if bMarker then gosub "drawMarker"
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
textAlign = TEXTALIGN_LEFT
szPrefix = rowStrings[idx][1]
bShowUnit = bShowDimensionUnit[idx]
add2 frameDistHalf+rowWidth[idx][2], -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
gosub "callQuantity"
rectLength = rowWidth[idx][3]
if bMove2D then
rect2 0, 0, rectLength, -textSpace[TEXTSTYLE_DATA_LEFT]+2*textOffset[TEXTSTYLE_DATA_LEFT]
endif
del 1
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
if rowType[idx][1] = ROWTYPE_TITLE then
if bFixWidth then
if idx = ROW__ZONE_NAME__ZONE_NAME then
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = bFixWidth
gosub "makeParagraph"
richtext2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], "textBlock" + textStyleName
if bMove2D then
rect2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], rowWidth[idx][1], -currentPosY-textOffset[TEXTSTYLE_TITLE]-calcTitleHeightZoneName1
endif
currentPosY = currentPosY + rowHeight[idx]
endif
if idx = ROW__ZONE_NAME__ZONE_NAME2 then
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = bFixWidth
gosub "makeParagraph"
richtext2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], "textBlock" + textStyleName
if bMove2D then
rect2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], rowWidth[idx][1], -currentPosY-textOffset[TEXTSTYLE_TITLE]-calcTitleHeightZoneName2
endif
currentPosY = currentPosY + rowHeight[idx]
endif
else
textStyleName = textStyles[TEXTSTYLE_TITLE][idx]
iAnchorPos = textAnchor[TEXTSTYLE_TITLE][idx]
stText = rowStrings[idx][1]
_bFixWidth = bFixWidth
gosub "makeParagraph"
richtext2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], "textBlock" + textStyleName
if bMove2D then
rect2 0, -currentPosY-textOffset[TEXTSTYLE_TITLE], rowWidth[idx][1], -currentPosY-textSpace[TEXTSTYLE_TITLE]+textOffset[TEXTSTYLE_TITLE]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_TITLE]
endif
return
endif
if rowType[idx][1] = ROWTYPE_ONORM then
for i = 1 to vardim1(bNormCustomString)
if bNormCustomString[i] then
nRow = nRow + 1
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = normCustomString[i]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
pen SYMB_VIEW_PEN
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf+widthNormCustomString[i], -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
endif
next i
return
endif
if rowType[idx][1] = ROWTYPE_MEASUREDNET then
unitValue = rowValue[idx]
iUnitType = unitType[rowType[idx][3]][1]
szPrefix = ""
bShowUnit = bShowDimensionUnit[idx]
if bMeasuredNetAreaCodeIsEmpty then
add2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
textAlign = TEXTALIGN_LEFT
gosub "callQuantity"
del 1
else
textStyleName = textStyles[TEXTSTYLE_DATA_LEFT][idx]
iAnchorPos = textAnchor[TEXTSTYLE_DATA_LEFT][idx]
stText = rowStrings[idx][1]
_bFixWidth = 0
gosub "makeParagraph"
richtext2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], "textBlock" + textStyleName
if iStyleType = STYLE_3 then
add2 rowWidth[idx][2]-frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
textAlign = TEXTALIGN_LEFT
gosub "callQuantity"
rectLength = rowWidth[idx][1]
del 1
else
add2 maxStampWidth-frameDistHalf-unitLength[rowType[idx][3]][2], -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT]
textAlign = TEXTALIGN_RIGHT
gosub "callQuantity"
rectLength = maxStampWidth-frameDistHalf*2
del 1
endif
endif
if bMove2D then
rect2 frameDistHalf, -currentPosY-textOffset[TEXTSTYLE_DATA_LEFT], frameDistHalf + rectLength, -currentPosY-textSpace[TEXTSTYLE_DATA_LEFT]+textOffset[TEXTSTYLE_DATA_LEFT]
endif
currentPosY = currentPosY + textSpace[TEXTSTYLE_DATA_LEFT]
gosub "drawStampLine"
return
endif
endif
return
! ==============================================================================
"makeParagraph":
! ------------------------------------------------------------------------------
! Input Parameters:
! textStyleName: Current Text Style Name
! stText: Current string
! iAnchorPos: Current Anchor Position
! _bFixWidth: FixWidth
! Output Parameters: none
! ==============================================================================
PARAGRAPH textStyleName 1, 0, 0, 0, 1, 0
style textStyleName
stText
ENDPARAGRAPH
TEXTBLOCK "textBlock" + textStyleName _bFixWidth * fixWidth, iAnchorPos, 0, 1, 1, 0, textStyleName
return
am 2014-05-18 11:10 PM
Wenn dies ordentlich auskommentiert wäre - wäre (schöne Wortwiederholung..) es sehr leicht sowas dazu zu scripten...
am 2014-05-19 03:10 AM
am 2014-05-19 09:26 AM
am 2014-05-20 12:37 AM
Der Raumstempel nutzt ein gemeinsames Script für viele (alle?) Raumstempel.
am 2014-05-20 06:36 PM
am 2014-05-20 08:48 PM