Skip to content

Commit 951a34d

Browse files
committed
Drawing functions improvements and fixes
1 parent cc24395 commit 951a34d

16 files changed

+43
-19
lines changed

functions/Drawing/dxCreateScreenSource.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ client:
2323
constructorclass: DxScreenSource
2424
notes:
2525
- type: tip
26-
content: Successful screen source creation is not guaranteed, and may fail due to hardware or memory limitations. You should always check to see if this function has returned **false**.
26+
content: |
27+
- It is highly recommended that [[dxSetTestMode]] is used when writing and testing scripts using **dxCreateScreenSource**.
28+
- Successful screen source creation is not guaranteed, and may fail due to hardware or memory limitations. You should always check to see if this function has returned **false**.

functions/Drawing/dxCreateTexture.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,7 @@ client:
100100
description: Added **textureType** and **depth** arguments.
101101
- version: 1.3.0-9.04035
102102
description: Added **textureEdge** argument.
103+
- version: 1.6.0-9.22188
104+
description: Added **rgb** and **xrgb** texture format.
105+
version:
106+
updated: 1.6.0-9.22188

functions/Drawing/dxDrawImageSection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ client:
6262
default: 'false'
6363
examples:
6464
- path: examples/dxDrawImageSection-1.lua
65-
description: Example 1The example draws a section of an image.
65+
description: The example draws a section of an image.
6666
returns:
6767
values:
6868
- type: bool

functions/Drawing/dxDrawMaterialLine3D.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ client:
6363
notes:
6464
- type: tip
6565
content: |
66-
- The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.
66+
- The 3D line with a large **width** value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for **faceToward**.
6767
- 3D lines are drawn at a particular place in the [game processing order](/reference/Game_Processing_Order), so use [[onClientPreRender]] for drawing if you are attaching them to world elements.
6868
meta:
6969
- changelog:

functions/Drawing/dxDrawText.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ client:
2323
default: topY
2424
- name: color
2525
type: int
26-
description: The color of the text, a value produced by tocolor or 0xAARRGGBB
26+
description: The color of the text, a value produced by [[tocolor]] or 0xAARRGGBB
2727
(AA = alpha, RR = red, GG = green, BB = blue).
28-
default: white
28+
default: '0xFFFFFFFF'
2929
- name: textSize
3030
type: float
3131
description: The size of the text scale.

functions/Drawing/dxDrawWiredSphere.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ client:
2222
type: float
2323
description: A width of line.
2424
- name: iterations
25-
type: uint
25+
type: int
2626
description: Number 1, 2, 3 or 4. 1 mean low density, 4 mean high.
2727
examples:
2828
- path: examples/dxDrawWiredSphere-1.lua

functions/Drawing/dxGetFontHeight.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
client:
22
name: dxGetFontHeight
3-
description: This function retrieves the theoretical height of a certain piece of
4-
text, if it were to be drawn using [[dxDrawText]].
3+
description: This function returns the height of a **single line** of text for the given font. If you want to check the height of the entire multi-line text, use [[dxGetTextSize]].
54
parameters:
65
- name: scale
76
type: float

functions/Drawing/dxGetPixelColor.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
client:
22
name: dxGetPixelColor
33
pair: dxSetPixelColor
4-
description: This function gets the color of a single pixel from [pixels](/reference/Pixels) contained in a string. It only works with `plain` format pixels.
4+
description: This function gets the color of a single pixel from [pixels](/reference/Pixels) contained in a string.
55
parameters:
66
- name: pixels
77
type: string
@@ -24,4 +24,7 @@ client:
2424
name: b
2525
- type: int
2626
name: a
27-
description: Returns 4 int s representing the rgba color value of the pixel if succesful, or **false** if invalid arguments were passed to the function.
27+
description: Returns 4 int s representing the rgba color value of the pixel if succesful, or **false** if invalid arguments were passed to the function.
28+
notes:
29+
- type: info
30+
content: It only works with `plain` format pixels.

functions/Drawing/dxGetPixelsFormat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ client:
1313
values:
1414
- type: string
1515
name: pixels format
16-
templateList: pixels-format
16+
templateList: pixels-format_with_dds
1717
description: Returns the format of the pixels if successful, **false** if invalid arguments were passed to the function.

functions/Drawing/dxGetPixelsSize.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
client:
22
name: dxGetPixelsSize
3-
description: This function gets the dimensions of [pixels](/reference/Pixels) contained in a string. It works with all pixel formats.
3+
description: This function gets the dimensions of [pixels](/reference/Pixels) contained in a string. It works with **all** pixel formats.
44
parameters:
55
- name: pixels
66
type: string

0 commit comments

Comments
 (0)