Sha256: 6c240429eeca2377dde8fdeb66659430dfe49cb79eee4e57101018a164272af7

Contents?: true

Size: 542 Bytes

Versions: 1

Compression:

Stored size: 542 Bytes

Contents

// -*- c++ -*-
#include "event.h"


#include <assert.h>


namespace Reflex
{


	static CGPoint
	correct_point (UIView* view, UITouch* touch)
	{
		assert(view && touch);
		CGPoint p = [touch locationInView: view];
		p.y = [view bounds].size.height - p.y;
		return p;
	}


	NativePointerEvent::NativePointerEvent (NSSet* touches, UIEvent* e, UIView* view, Type type)
	:	PointerEvent(type, POINTER_TOUCH, (coord) 0, (coord) 0, 0, 1, type == MOVE)
	{
		CGPoint p = correct_point(view, [touches anyObject]);
		x = p.x;
		y = p.y;
	}


};// Reflex

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reflexion-0.1.10 src/ios/event.mm