Skip to content

Commit 15d11e1

Browse files
committed
Update docs. PaintBuffer methods will be renamed in next release.
1 parent 10a4625 commit 15d11e1

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

api/PaintBuffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# PaintBuffer (object)
55

6-
This object is related to: [Browser](Browser.md).GetImage() and [RenderHandler](RenderHandler.md).OnPaint().
6+
This object used in: [RenderHandler](RenderHandler.md).OnPaint().
77

88

99
Table of contents:

examples/Examples-README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ workarounds.
3131
third party GUI framework to run
3232
- [tutorial.py](tutorial.py) - Example from [Tutorial](../docs/Tutorial.md)
3333
- [screenshot.py](screenshot.py) - Example of off-screen rendering mode
34-
to create a screenshot of a web page. Also referenced in Tutorial
35-
in the [Off-screen rendering](../docs/Tutorial.md#off-screen-rendering)
34+
to create a screenshot of a web page. The code from this example is
35+
discussed in great details in Tutorial in the [Off-screen rendering](../docs/Tutorial.md#off-screen-rendering)
3636
section.
3737

3838
**Embedding using various GUI frameworks**
@@ -66,8 +66,6 @@ maintained.
6666
see [Panda3D](https://github.com/cztomczak/cefpython/wiki/Panda3D) wiki page.
6767
- PyGame/PyOpenGL:
6868
see [gist by AnishN](https://gist.github.com/AnishN/aa3bb27fc9d69319955ed9a8973cd40f)
69-
- Screenshot example:
70-
see [gist by stefanbacon](https://gist.github.com/stefanbacon/7b1571d57aee54aa9f8e9021b4848d06)
7169
- Example of implementing [ResourceHandler](../api/ResourceHandler.md)
7270
with the use of [WebRequest](../api/WebRequest.md) object and
7371
[WebRequestClient](../api/WebRequestClient.md) interface to allow

src/paint_buffer.pyx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ cdef class PaintBuffer:
1818
cdef int height
1919
cdef Py_ssize_t length
2020

21-
cpdef uintptr_t GetIntPointer(self) except *:
21+
def __init__(self):
22+
# TODO: Remove deprecated methods below from API reference
23+
# and update examples during next release
24+
self.GetIntPointer = self.GetPointer
25+
self.GetString = self.GetBytes
26+
27+
cpdef uintptr_t GetPointer(self) except *:
2228
return <uintptr_t>self.buffer
2329

24-
cpdef object GetString(self, str mode="bgra", str origin="top-left"):
30+
cpdef object GetBytes(self, str mode="bgra", str origin="top-left"):
2531
cdef void* dest
2632
cdef py_bool dest_alloced = False
2733
cdef object ret

0 commit comments

Comments
 (0)