Skip to content

Commit

Permalink
20R7
Browse files Browse the repository at this point in the history
Project dependencies compatibility
  • Loading branch information
vdelachaux committed Oct 1, 2024
1 parent 3aa92d0 commit 707ed58
Show file tree
Hide file tree
Showing 21 changed files with 310 additions and 234 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ on:

jobs:
build:
name: "Build"
runs-on: windows-latest
name: "Build on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build
uses: 4d/build4d-action@main
with:
product-line: vcs
version: vcs
build: official
token: ${{ secrets.DLTK }}

Binary file modified Build/4DPop-ColorChart.dmg
Binary file not shown.
Binary file modified Build/Components/4DPop ColorChart.4dbase/4DPop ColorChart.4DZ
Binary file not shown.
8 changes: 4 additions & 4 deletions Build/Components/4DPop ColorChart.4dbase/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

<dict>
<key>CFBundleShortVersionString</key>
<string>20R6</string>
<string>20R7</string>
<key>CFBundleLongVersionString</key>
<string>20R6 (90)</string>
<string>20R7 (91)</string>
<key>NSHumanReadableCopyright</key>
<string>©4D SAS 2009-2024</string>
<key>CFBundleVersion</key>
<string>91</string>
<string>92</string>
<key>CFBundleName</key>
<string>4DPop ColorChart</string>
<key>CFBundleGetInfoString</key>
<string>20R6</string>
<string>20R7</string>
<key>CFBundleDisplayName</key>
<string>4DPop ColorChart</string>
</dict>
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

<dict>
<key>CFBundleShortVersionString</key>
<string>20R6</string>
<string>20R7</string>
<key>CFBundleLongVersionString</key>
<string>20R6 (90)</string>
<string>20R7 (91)</string>
<key>NSHumanReadableCopyright</key>
<string>©4D SAS 2009-2024</string>
<key>CFBundleVersion</key>
<string>91</string>
<string>92</string>
<key>CFBundleName</key>
<string>4DPop ColorChart</string>
<key>CFBundleGetInfoString</key>
<string>20R6</string>
<string>20R7</string>
<key>CFBundleDisplayName</key>
<string>4DPop ColorChart</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Project/4DPop ColorChart.4DProject
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$comment": "The project file let you override the location for most folders",
"compatibilityVersion": 1830,
"$4DPopAppMakerToolVersion": "20R6"
"$4DPopAppMakerToolVersion": "20R7"
}
99 changes: 52 additions & 47 deletions Project/Sources/Forms/PaletteHelp/method.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ Case of
//________________________________________
: (Form event code:C388=On Load:K2:1)

C_LONGINT:C283(<>Color)

C_PICTURE:C286(<>FakePict)

C_PICTURE:C286(<>Sample1)
C_PICTURE:C286(<>Sample2)
C_PICTURE:C286(<>Sample3)
C_PICTURE:C286(<>Sample4)
C_PICTURE:C286(<>Sample5)
C_PICTURE:C286(<>Sample6)
C_PICTURE:C286(<>Sample7)
C_PICTURE:C286(<>Sample8)
C_PICTURE:C286(<>Sample9)
C_PICTURE:C286(<>Sample10)
C_PICTURE:C286(<>Sample11)
C_PICTURE:C286(<>Sample12)
C_PICTURE:C286(<>Sample13)
C_PICTURE:C286(<>Sample14)
C_PICTURE:C286(<>Sample15)
C_PICTURE:C286(<>Sample16)

//LECTURE DES PRÉFÉRENCES
var <>Color : Integer

var <>FakePict : Picture

var <>Sample1 : Picture
var <>Sample2 : Picture
var <>Sample3 : Picture
var <>Sample4 : Picture
var <>Sample5 : Picture
var <>Sample6 : Picture
var <>Sample7 : Picture
var <>Sample8 : Picture
var <>Sample9 : Picture
var <>Sample10 : Picture
var <>Sample11 : Picture
var <>Sample12 : Picture
var <>Sample13 : Picture
var <>Sample14 : Picture
var <>Sample15 : Picture
var <>Sample16 : Picture

// LECTURE DES PRÉFÉRENCES
Form:C1466.preferences:=pop.Preferences.new("Color_Chart")

//set default values
// Set default values
var $i : Integer
var $o : Object

Expand All @@ -46,10 +46,10 @@ Case of

$o:=Form:C1466.preferences.get()

C_LONGINT:C283(<>rbtn_dec; <>rbtn_hex)
var <>rbtn_dec; <>rbtn_hex : Integer

<>rbtn_dec:=Num:C11($o.decimalFormat)
<>rbtn_hex:=Choose:C955(<>rbtn_dec; 1; 0)
<>rbtn_hex:=<>rbtn_dec ? 1 : 0
OBJECT SET FORMAT:C236(<>Color; Choose:C955(<>rbtn_dec; "&x"; "|DecColorFormat"))

ARRAY LONGINT:C221(<>_SampleValue; 0)
Expand All @@ -63,26 +63,27 @@ Case of

End for

C_TEXT:C284(<>SampleName1)
C_TEXT:C284(<>SampleName2)
C_TEXT:C284(<>SampleName3)
C_TEXT:C284(<>SampleName4)
C_TEXT:C284(<>SampleName5)
C_TEXT:C284(<>SampleName6)
C_TEXT:C284(<>SampleName7)
C_TEXT:C284(<>SampleName8)
var <>SampleName1 : Text

var <>SampleName2 : Text
var <>SampleName3 : Text
var <>SampleName4 : Text
var <>SampleName5 : Text
var <>SampleName6 : Text
var <>SampleName7 : Text
var <>SampleName8 : Text

ARRAY TEXT:C222($_SampleNames; 0)
COLLECTION TO ARRAY:C1562($o.samplenames; $_SampleNames)

For ($i; 1; Size of array:C274($_SampleNames); 1)

$Ptr:=Get pointer:C304("<>SampleName"+String:C10($i))
$Ptr->:=Choose:C955(Length:C16($_SampleNames{$i})#0; $_SampleNames{$i}; Get localized string:C991("ColorChart_Sample")+" "+String:C10($i)) //sample ou echantillon
$Ptr->:=Length:C16($_SampleNames{$i})#0 ? $_SampleNames{$i} : Localized string:C991("ColorChart_Sample")+" "+String:C10($i) // Sample ou echantillon

End for

//INITIALISATION DU DIALOGUE AVEC UNE PALETTE PAR DEFAUT EN DEMI TEINTES
// INITIALISATION DU DIALOGUE AVEC UNE PALETTE PAR DEFAUT EN DEMI TEINTES

vH:=180
vS:=50
Expand All @@ -93,18 +94,18 @@ Case of
// @UPDATE@ 12/04/15 - Mise en commentaire - OBJET FIXER COULEURS RVB(*;"TestObject";0;<>Color)

ARRAY TEXT:C222(<>PopMode; 6)
<>PopMode{1}:=Get localized string:C991("ColorChart_Mode1")
<>PopMode{2}:=Get localized string:C991("ColorChart_Mode2")
<>PopMode{3}:=Get localized string:C991("ColorChart_Mode3")
<>PopMode{4}:=Get localized string:C991("ColorChart_Mode4")
<>PopMode{5}:=Get localized string:C991("ColorChart_Mode5")
<>PopMode{6}:=Get localized string:C991("ColorChart_Mode6")
<>PopMode{1}:=Localized string:C991("ColorChart_Mode1")
<>PopMode{2}:=Localized string:C991("ColorChart_Mode2")
<>PopMode{3}:=Localized string:C991("ColorChart_Mode3")
<>PopMode{4}:=Localized string:C991("ColorChart_Mode4")
<>PopMode{5}:=Localized string:C991("ColorChart_Mode5")
<>PopMode{6}:=Localized string:C991("ColorChart_Mode6")

<>PopMode:=1
<>ColorPicker:=1

ARRAY LONGINT:C221(<>_Colors; 256)
C_LONGINT:C283(<>ColorPicker)
var <>ColorPicker : Integer

GOTO OBJECT:C206(<>FakePict)

Expand All @@ -120,7 +121,7 @@ Case of
Case of

//----------------------------------------
: (<>PopMode=1) //256 hues
: (<>PopMode=1) // 256 hues

For ($i; 1; 256; 1)

Expand All @@ -131,7 +132,8 @@ Case of
End for

//----------------------------------------
: (<>PopMode=2) //256 saturations

: (<>PopMode=2) // 256 saturations

For ($i; 1; 256; 1)

Expand All @@ -142,7 +144,8 @@ Case of
End for

//----------------------------------------
: (<>PopMode=3) //256 lights

: (<>PopMode=3) // 256 lights

For ($i; 1; 256; 1)

Expand All @@ -153,7 +156,8 @@ Case of
End for

//----------------------------------------
: (<>PopMode=4) //16 hues, 16 luminosities

: (<>PopMode=4) // 16 hues, 16 luminosities

For ($i; 1; 16; 1)

Expand All @@ -168,7 +172,7 @@ Case of
End for

//----------------------------------------
: (<>PopMode=5) //16 hues, 16 saturations
: (<>PopMode=5) // 16 hues, 16 saturations

For ($i; 1; 16; 1)

Expand Down Expand Up @@ -236,6 +240,7 @@ Case of
End for

$c:=New collection:C1472

ARRAY TO COLLECTION:C1563($c; $_SampleNames)
Form:C1466.preferences.set("samplenames"; $c)

Expand Down
50 changes: 31 additions & 19 deletions Project/Sources/Methods/Color_HSL_to_RGB.4dm
Original file line number Diff line number Diff line change
@@ -1,62 +1,74 @@
//%attributes = {"invisible":true}
//$Color:=Color_HSL_to_RGB (->$Hue;->$Saturation;->$Light)
// $Color:=Color_HSL_to_RGB (->$Hue;->$Saturation;->$Light)

C_LONGINT:C283($1;$2;$3)
C_LONGINT:C283($0)
var $1; $2; $3 : Integer
var $0 : Integer

C_LONGINT:C283($Hue;$Saturation;$Luminosity)
C_LONGINT:C283($Red;$Green;$Blue)
C_LONGINT:C283($Min;$Max;$Delta)
var $Hue; $Saturation; $Luminosity : Integer
var $Red; $Green; $Blue : Integer
var $Min; $Max; $Delta : Integer

$Hue:=$1%360 // 0 à 360°
$Saturation:=$2 // 0 à 100%
$Luminosity:=$3 // 0 à 100%

$Hue:=$1%360 //0 à 360°
$Saturation:=$2 //0 à 100%
$Luminosity:=$3 //0 à 100%

$Max:=$Luminosity*255/100 //RGB vont de 0 à 255
$Max:=$Luminosity*255/100 // RGB vont de 0 à 255
$Min:=$Max*((100-$Saturation)/100)
$Delta:=$Max-$Min

Case of

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=300)

$Hue:=$Hue-300
$Red:=$Max
$Green:=$Min
$Blue:=$Max-($Delta*($Hue/60)) //Bleu décroissant
$Blue:=$Max-($Delta*($Hue/60)) // Bleu décroissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=240)

$Hue:=$Hue-240
$Blue:=$Max
$Green:=$Min
$Red:=$Min+($Delta*($Hue/60)) //Rouge croissant
$Red:=$Min+($Delta*($Hue/60)) // Rouge croissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=180)

$Hue:=$Hue-180
$Blue:=$Max
$Red:=$Min
$Green:=$Max-($Delta*($Hue/60)) //Vert décroissant
$Green:=$Max-($Delta*($Hue/60)) // Vert décroissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=120)

$Hue:=$Hue-120
$Green:=$Max
$Red:=$Min
$Blue:=$Min+($Delta*($Hue/60)) //bleu croissant
$Blue:=$Min+($Delta*($Hue/60)) // Bleu croissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=60)

$Hue:=$Hue-60
$Green:=$Max
$Blue:=$Min
$Red:=$Max-($Delta*($Hue/60)) //Rouge décroissant
$Red:=$Max-($Delta*($Hue/60)) // Rouge décroissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
: ($Hue>=0)
$Hue:=$Hue-0 //pour la symétrie des autres cas :-)

$Hue:=$Hue-0 // Pour la symétrie des autres cas :-)
$Red:=$Max
$Blue:=$Min
$Green:=$Min+($Delta*($Hue/60)) //vert croissant
$Green:=$Min+($Delta*($Hue/60)) // Vert croissant

//┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
End case

$Color:=($red << 16)+($Green << 8)+$Blue

$0:=$Color
$0:=$Color
Loading

0 comments on commit 707ed58

Please sign in to comment.