Jump to content

GreCharRect: Difference between revisions

From EDM2
Created page with "GreCharRect draws a rectangle of character cells from the LVB to the device context. The attributes for each character are applied by the handling routine as the character is ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreCharRect draws a rectangle of character cells from the LVB to the device context. The attributes for each character are applied by the handling routine as the character is drawn.  
GreCharRect draws a rectangle of character cells from the LVB to the device context. The attributes for each character are applied by the handling routine as the character is drawn.


;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.  
;Simulation support: This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.


== Syntax ==  
== Syntax ==  
  GreCharRect(hdc, pVioPS, pCharRect, pInstance, lFunction);
  GreCharRect(hdc, pVioPS, pCharRect, pInstance, lFunction)


== Parameters ==
== Parameters ==
;hdc (HDC) - input  
;hdc (HDC) - input:The device context handle.
:The device context handle.  
;pVioPS (VioPresentationSpace *) - input:A pointer to the Vio presentation space.
 
;pCharRect (LPGridRectRef) - input:A pointer to a parameter block. This is a GridRectRef structure:
;pVioPS (VioPresentationSpace *) - input  
:*StartRow The starting row (relative to the bottom left of the LVB) of the character rectangle to be drawn
:A pointer to the Vio presentation space.  
:*StartCol The starting column (relative to the bottom left of the LVB) of the character rectangle to be drawn
 
:*RectWidth The width in character cells of the rectangle to be updated
;pCharRect (LPGridRectRef) - input  
:*RectHeight The height of the rectangle to be updated
:A pointer to a parameter block. This is a GridRectRef structure:  
;pInstance (PVOID) - input:A pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreCharRect.
:*StartRow The starting row (relative to the bottom left of the LVB) of the character rectangle to be drawn  
 
:*StartCol The starting column (relative to the bottom left of the LVB) of the character rectangle to be drawn  
 
:*RectWidth The width in character cells of the rectangle to be updated  
 
:*RectHeight The height of the rectangle to be updated  
 
;pInstance (PVOID) - input  
:A pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreCharRect.  


== Returns ==
== Returns ==
;rc (LONG) - returns  
;rc (LONG) - returns:Return codes.
:Return codes.  
:This function returns a LONG value as an error indicator.
 
:*NO_ERROR Successful.
:This function returns a LONG value as an error indicator.  
:*CE_INVALID_PRESENTATION_SPACE Error. For example, this message might be returned as a result of an invalid CellByteSize.
 
:*NO_ERROR Successful.  
:*CE_INVALID_PRESENTATION_SPACE Error. For example, this message might be returned as a result of an invalid CellByteSize.  
 
== Sample ==
<pre>
#define INCL_AVIOP
#include <os2.h>
 
HDC                      hdc;        /*  The device context handle. */
VioPresentationSpace    *pVioPS;    /*  A pointer to the Vio presentation space. */
LPGridRectRef            pCharRect;
PVOID                    pInstance;  /*  A pointer to instance data. */
ULONG                    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCharRect. */
LONG                      rc;        /*  Return codes. */
 
rc = GreCharRect(hdc, pVioPS, pCharRect, pInstance,
      lFunction);
</pre>


== Remarks ==
== Remarks ==
This function is used to implement the advanced Vio function, VioSetOrg.  
This function is used to implement the advanced Vio function, [[VioSetOrg]].


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 23:11, 17 January 2020

GreCharRect draws a rectangle of character cells from the LVB to the device context. The attributes for each character are applied by the handling routine as the character is drawn.

Simulation support
This function is mandatory for display drivers. For other drivers, it is simulated by a handling routine in the graphics engine.

Syntax

GreCharRect(hdc, pVioPS, pCharRect, pInstance, lFunction)

Parameters

hdc (HDC) - input
The device context handle.
pVioPS (VioPresentationSpace *) - input
A pointer to the Vio presentation space.
pCharRect (LPGridRectRef) - input
A pointer to a parameter block. This is a GridRectRef structure:
  • StartRow The starting row (relative to the bottom left of the LVB) of the character rectangle to be drawn
  • StartCol The starting column (relative to the bottom left of the LVB) of the character rectangle to be drawn
  • RectWidth The width in character cells of the rectangle to be updated
  • RectHeight The height of the rectangle to be updated
pInstance (PVOID) - input
A pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreCharRect.

Returns

rc (LONG) - returns
Return codes.
This function returns a LONG value as an error indicator.
  • NO_ERROR Successful.
  • CE_INVALID_PRESENTATION_SPACE Error. For example, this message might be returned as a result of an invalid CellByteSize.

Remarks

This function is used to implement the advanced Vio function, VioSetOrg.