Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code to create a contrasting color
Message
De
26/10/2010 08:19:13
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01486509
Message ID:
01486976
Vues:
83
This message has been marked as the solution to the initial question of the thread.
>It turns out that since an image can have any color at any point that I needed to check around the area of the crop box. I am now looking at the starting 4 corners and changing the color based on the majority color. Also I found that white is best overall for the box outline so I am testing for the brightness at the 4 corners. If it is very bright then I use black. As Dragan pointed out, using the contrasting color does not work if you have a mid range color. It would be wonderful if I could change the color at each point on the shape border but I fear that is beyond the capabilities of VFP, at least without drawing and re-drawing every point individually.

Just a late idea - you may want to experiment with the .drawmode property. Cycle through a few values - you may hit a good combination (of the shape border color and draw mode) and do no coding at all.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform