Command QisLib_SetReferenceVectorMatrix QisLib_SetReferenceVectorMatrix ``` Function: int QisLib_SetReferenceVectorMatrix(int OnOff); Inputs: On/Off: _QIS_ON (On) or _QIS_OFF (Off) Return: 0 (always) Errors: - Description: - Controls how QisLib returns information about cell/array reference orientation. - If set to on, the orientation information of the Sref or Aref is contained in a 2x2 Transformation matrix. - If set to off, the orientation information is contained in Reflection, Rotation and Scale. - The user's program can use this information to draw the corresponding data. - If on, the MatrixMode member of CQisSARef is 1, else it is 0 - When this setting is on, members of CQisSARef, RowOffX RowOffY ColOffX ColOffY contain some extra information for Array References. RowOffX and RowOffY represent x and y distance between elements of the array along a row. ColOffX and ColOffY represent x and y distance between elements of the array along a column. Example: Consider that QisLib_SetReferenceVectorMatrix is set to on Referring to CQisSARef, and from the above description, Tm[4] contains the transformation matrix RowOffX, RowOffY: x and y distance between elements of the array along a row [Arefs only] ColOffX, ColOffY: x and y distance between elements of the array along a column [Arefs only] InsertX, InsertY: x and y co-ordinates of the point of insertion Let (Xin,Yin) be a point somewhere on row number RowNum and column number ColNum We can now transform (Xin,Yin) to (Xout,Yout) as follows : Xout = (Tm[0]*Xin + Tm[1]*Yin) + InsertX + (RowNum*RowOffX + ColNum*ColOffX); Yout = (Tm[2]*Xin + Tm[3]*Yin) + InsertY + (RowNum*RowOffY + ColNum*ColOffY) ... (f1) For SREFs, RowOffX = RowOffY = ColOffX = ColOffY = 0. hence the above formula (f1) is reduced to Xout = (Tm[0]*Xin + Tm[1]*Yin) + InsertX Yout = (Tm[2]*Xin + Tm[3]*Yin) + InsertY ............. (f2) However, if QisLib_SetReferenceVectorMatrix is set to off, the user's program has to calculate the transformation matrix from the values of Scale, Rotation and Reflection accumalated through the cell reference hierarchy. ``` References: QisLib_CQisSARef