Go to the source code of this file.
|
| static float | calculate_r_sample (float x, float y, float aspect_ratio, float sn, float cs) |
| |
| static void | closest_point_to_line (float lx, float ly, float px, float py, float *ox, float *oy) |
| |
| void | destroy_internal_surface_callback (MyPaintSurface *surface) |
| |
| static float | sign_point_in_line (float px, float py, float vx, float vy) |
| |
◆ calculate_r_sample()
| static float calculate_r_sample |
( |
float | x, |
|
|
float | y, |
|
|
float | aspect_ratio, |
|
|
float | sn, |
|
|
float | cs ) |
|
inlinestatic |
Definition at line 428 of file MyPaintSurface.cpp.
428 {
429
430 const float yyr=(
y*cs-
x*sn)*aspect_ratio;
431 const float xxr=
y*sn+
x*cs;
432 const float r = (yyr*yyr + xxr*xxr);
434}
◆ closest_point_to_line()
| static void closest_point_to_line |
( |
float | lx, |
|
|
float | ly, |
|
|
float | px, |
|
|
float | py, |
|
|
float * | ox, |
|
|
float * | oy ) |
|
inlinestatic |
Definition at line 443 of file MyPaintSurface.cpp.
443 {
444
445 const float l2 = lx*lx + ly*ly;
446 const float ltp_dot = px*lx + py*ly;
447 const float t = ltp_dot / l2;
448 *ox = lx * t;
449 *oy = ly * t;
450}
◆ destroy_internal_surface_callback()
| void destroy_internal_surface_callback |
( |
MyPaintSurface * | surface | ) |
|
◆ sign_point_in_line()
| static float sign_point_in_line |
( |
float | px, |
|
|
float | py, |
|
|
float | vx, |
|
|
float | vy ) |
|
inlinestatic |
Definition at line 437 of file MyPaintSurface.cpp.
437 {
438
439 return (px - vx) * (-vy) - (vx) * (py - vy);
440}