Skip to content

Commit

Permalink
fix knob hit region
Browse files Browse the repository at this point in the history
  • Loading branch information
adlr committed Feb 15, 2014
1 parent 3292e9c commit 37a3478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion graphic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int Graphic::PointInKnob(const Point& location) const {
int knob = 1 << i;
if (!(Knobs() & knob))
continue;
Rect frame = KnobFrame(knob);
Rect frame = KnobFrame(knob).InsetBy(-0.5);
if (frame.Contains(location))
return knob;
}
Expand Down
5 changes: 5 additions & 0 deletions pdfsketch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ class PDFSketchInstance : public pp::Instance {
}

virtual bool HandleInputEvent(const pp::InputEvent& event) {
// if (event.GetType() == PP_INPUTEVENT_TYPE_MOUSEMOVE) {
// pp::MouseInputEvent mouse_evt(event);
// pp::Point mouse_pos = mouse_evt.GetPosition();
// printf("Mouse: %d %d\n", mouse_pos.x(), mouse_pos.y());
// }
render_thread_.message_loop().PostWork(
callback_factory_.NewCallback(&PDFSketchInstance::HandleInputEventThread,
event));
Expand Down

0 comments on commit 37a3478

Please sign in to comment.