Home | History | Annotate | Download | only in scaling

Lines Matching refs:pp

24 // Example plugin to demonstrate usage of pp::View and pp::Graphics2D APIs for
26 class MyInstance : public pp::Instance {
29 : pp::Instance(instance),
41 virtual void DidChangeView(const pp::View& view) {
42 pp::Rect view_rect = view.GetRect();
60 virtual bool HandleInputEvent(const pp::InputEvent& event) {
70 virtual void HandleMessage(const pp::Var& message_data) {
94 void HandleMouseDown(const pp::InputEvent& event) {
95 pp::MouseInputEvent mouse_event(event);
96 pp::Point position(mouse_event.GetPosition());
97 pp::Point position_device(position.x() * device_scale_,
104 pp::Point position_css(position.x() / css_scale_,
117 // This will set up a properly-sized pp::Graphics2D, and tell Pepper
120 device_context_ = pp::Graphics2D(this,
121 pp::Size(pixel_width_, pixel_height_),
124 // If SetScale is promoted to pp::Graphics2D, the dc_dev constructor
131 device_context_ = pp::Graphics2D(this, pp::Size(width_, height_), true);
140 pp::ImageData image(this, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
141 pp::Size(width, height), false);
150 // pp::Graphics2D.
153 // pp::Graphics2D, as well as how to use the GetCSSScale value properly.
197 device_context_.Flush(pp::CompletionCallback(&OnFlush, this));
202 pp::Graphics2D device_context_;
214 class MyModule : public pp::Module {
216 MyModule() : pp::Module() {}
220 virtual pp::Instance* CreateInstance(PP_Instance instance) {
225 namespace pp {
232 } // namespace pp