MCPcopy Create free account
hub / github.com/cztomczak/cefpython / OnPaint

Method OnPaint

unittests/osr_test.py:250–259  ·  view source on GitHub ↗

Called when an element should be painted.

(self, element_type, paint_buffer, **_)

Source from the content-addressed store, hash-verified

248 return True
249
250 def OnPaint(self, element_type, paint_buffer, **_):
251 """Called when an element should be painted."""
252 if element_type == cef.PET_VIEW:
253 self.test_case.assertEqual(paint_buffer.width, 800)
254 self.test_case.assertEqual(paint_buffer.height, 600)
255 if not self.OnPaint_True:
256 self.OnPaint_True = True
257 subtest_message("RenderHandler.OnPaint: viewport ok")
258 else:
259 raise Exception("Unsupported element_type in OnPaint")
260
261 def OnTextSelectionChanged(self, selected_text, selected_range, **_):
262 if not self.OnTextSelectionChanged_True:

Callers

nothing calls this directly

Calls 1

subtest_messageFunction · 0.85

Tested by

no test coverage detected