LayoutContext
Vue de l’ensemble
‘LayoutContext’ est une classe dans Aspose.PDF FOSS pour Java.
Trace la position du cursor et les limites de l’espace contenu pendant le layout de page.
Cette classe fournit 16 méthodes pour travailler avec des objets LayoutContext dans les programmes Java. Les méthodologies disponibles comprennent: ‘LayoatContaxt’, ‘advanceCursor’, getAvailableWidth', ‘getContentBottom’, 'getcontentLeft', ’get ContentRight', ‚getCurseX', ''getTursoreY',getPageHeight’ , ‘getPagesWide’, et 4 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l’installation de l’Aspose.PDF FOSS pour le package Java Propriétés: available Wid', contenu bas, contenus 'left' contenant, Right contenue, plus de 4’cursors.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
availableWidth | double | Read | Returns the available width of the content area. |
remainingHeight | double | Read | Returns the remaining vertical space from the current cursor position |
| to the bottom of the content area. | |||
cursorX | double | Read | Returns the current horizontal cursor position. |
cursorY | double | Read | Returns the current vertical cursor position. |
contentLeft | double | Read | Returns the left edge of the content area. |
contentRight | double | Read | Returns the right edge of the content area. |
contentTop | double | Read | Returns the top edge of the content area. |
contentBottom | double | Read | Returns the bottom edge of the content area. |
pageWidth | double | Read | Returns the total page width. |
pageHeight | double | Read | Returns the total page height. |
méthodes
| Signature | Description |
|---|---|
LayoutContext(pageWidth: double, pageHeight: double, margins: MarginInfo) | Creates a LayoutContext for a page with the given dimensions and margins. |
getAvailableWidth() → double | Returns the available width of the content area. |
getRemainingHeight() → double | Returns the remaining vertical space from the current cursor position |
| to the bottom of the content area. | |
advanceCursor(height: double) | Moves the cursor down by the specified height. |
resetCursorX() | Resets the horizontal cursor to the left edge of the content area. |
hasSpace(height: double) → boolean | Returns whether there is enough vertical space remaining for content |
| of the given height. | |
getCursorX() → double | Returns the current horizontal cursor position. |
setCursorX(cursorX: double) | Sets the current horizontal cursor position. |
getCursorY() → double | Returns the current vertical cursor position. |
setCursorY(cursorY: double) | Sets the current vertical cursor position. |
getContentLeft() → double | Returns the left edge of the content area. |
getContentRight() → double | Returns the right edge of the content area. |
getContentTop() → double | Returns the top edge of the content area. |
getContentBottom() → double | Returns the bottom edge of the content area. |
getPageWidth() → double | Returns the total page width. |
getPageHeight() → double | Returns the total page height. |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise