Skip to content

Instantly share code, notes, and snippets.

View rafaga's full-sized avatar

Rafael rafaga

View GitHub Profile
@sampettersson
sampettersson / clipped_circle_rounded_rect.rs
Created March 1, 2023 14:19
A circle that is clipped to a rounded rect in EGUI
fn nearest_point_within_rounded_rect(
point: Pos2,
rect: Rect,
corner_radius: f32,
) -> Pos2 {
let mut x = point.x;
let mut y = point.y;
// Check if point is inside or outside the rounded corners
let mut in_top_left_corner = false;
@NelsonBrandao
NelsonBrandao / Button.js
Created September 10, 2016 16:29
React Native Example (Login Screen + Session Service + OAuth)
import React, { Component, PropTypes } from 'react';
import {
View,
Text,
Platform,
StyleSheet,
TouchableHighlight,
TouchableNativeFeedback
} from 'react-native';