From 7df02965aa0b3e86cdd6527ee103b2f528b0666c Mon Sep 17 00:00:00 2001 From: Valerie Date: Wed, 27 Sep 2023 18:08:01 -0400 Subject: [PATCH] added multisexual, polysexual flags; fixed polyamory flag scaling --- src/complex.rs | 7 +++---- src/flag.rs | 16 ++++++++++++++++ src/main.rs | 9 +++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/complex.rs b/src/complex.rs index 29a1deb..6184764 100644 --- a/src/complex.rs +++ b/src/complex.rs @@ -289,9 +289,9 @@ pub fn polyamory(small: bool) -> Flag { // constraints let linecount = height - (height % 3); // largest multiple of 3 smaller than height - let full_depth = width / 3; + let full_depth = linecount; let thresh = linecount / 3; // stripe & direction thresh - let start = width / 6; + let start = 2 * full_depth / 3; // piecewise function: ascent -> descent let mut separator = separators[0]; @@ -313,8 +313,7 @@ pub fn polyamory(small: bool) -> Flag { // advance index at threshold if n == (thresh * 2) { index = 1; } - let rel = (n - thresh) + 2; - let size = full_depth - rel; + let size = (2 * start) - n - 1; let color = stripes[index]; let line = format!( diff --git a/src/flag.rs b/src/flag.rs index 864876c..63835d0 100644 --- a/src/flag.rs +++ b/src/flag.rs @@ -128,6 +128,14 @@ pub fn multigender() -> Flag { Flag::Stripes(vec![blue, ltblue, orange, ltblue, blue]) } +pub fn multisexual() -> Flag { + let purple = rgb(0x724DC9); + let blue = rgb(0xFF3D9B); + let pink = rgb(0xFF3D9B); + + Flag::Stripes(vec![purple, WHITE, blue, pink]) +} + pub fn nonbinary() -> Flag { let yellow = rgb(0xFFF433); let purple = rgb(0x9B59D0); @@ -143,6 +151,14 @@ pub fn pansexual() -> Flag { Flag::Stripes(vec![magenta, yellow, cyan]) } +pub fn polysexual() -> Flag { + let pink = rgb(0xF61CB9); + let green = rgb(0x07D569); + let blue = rgb(0x1C92F6); + + Flag::Stripes(vec![pink, green, blue]) +} + pub fn transgender() -> Flag { let pink = rgb(0x7ACBF5); let blue = rgb(0xEAACB8); diff --git a/src/main.rs b/src/main.rs index 545da60..3f3e070 100644 --- a/src/main.rs +++ b/src/main.rs @@ -125,6 +125,9 @@ fn main() { Some("lesbian") => flag::lesbian(), + Some("multisexual" | "m-spec" | "mspec") + => flag::multisexual(), + Some("multigender") => flag::multigender(), @@ -137,12 +140,16 @@ fn main() { Some("polyamory" | "polyamorous" | "poly") => complex::polyamory(small), + Some("polysexual") + => flag::polysexual(), + Some("transgender" | "trans") => flag::transgender(), _ => { help_text(); exit(1) } }; + // draw flag flag.draw(!small); } @@ -186,10 +193,12 @@ fn list_text() { println!(" gendervoid gendervoid pride flag"); // println!(" intersex intersex pride flag"); println!(" lesbian lesbian pride flag"); + println!(" multisexual multisexual pride flag"); println!(" multigender multigender pride flag"); println!(" nb, nonbinary nonbinary pride flag"); println!(" pan, pansexual pansexual pride flag"); println!(" polyamory polyamorous pride flag"); + println!(" polysexual polysexual pride flag"); println!(" pride, rainbow six-color rainbow flag"); println!(" progress progress arrow flag"); println!(" trans, transgender transgender pride flag");