Category Archives: Graphics

All post related to graphics will be in this category

New component TrkSliderEdit

Showing rkSliderEdits with different colors

Some color alternatives

TrkSliderEdit in all its glory.

This component will make it a lot easier to handle input values. A slider, an edit and a label, all, in one component. It could not be any easier that this. Well that’s my opinion. I use this component in my photo edit program a lot and it saved me a lot of time. Maybe it can help you to.

Use arrow keys to step value up or down by one or page up/down to step value in steps of ten. Press space key to enter value or press mouse button in edit area. Mouse click in the slider area will move the slider to the new position.

I hope you find this component interesting and useful.

If you have any comments or suggestions give me a word.

Download source code and demo

My curves tool

A image showing the Curves tool in action

Curves tool in action


This is my curves tool. Inspired by the curves tool in Photoshop and Gimp. It keeps a list of presets which is located in a folder “curves” in the application folder. All files in this folder is .ACV files which is standard Adobe curve files. When you add a curve to the preset it saves the curve to the “curves” folder.

This project was updated 02.04.2015. When clicking outside the grid, or at an horizontal value where it already exists a point, it would give an error. This has now been corrected.

Download project source and executable

Hope you find this tool useful.

This is just a demo and not a complete application I think of it as a curves preview dialog.

Tiltshift in Delphi

PicTiltShift

Two simple programs for making tiltshift pictures in Delphi. A lot of improvements potential but it give you a starting point.

Not every image is suited for this effect, but that you will see very fast. Images with lots of sky or water usually do not work very well. City or landscape images might work out quite well. Do experiment.

I hope you like it and find it useful. The code is quite small. My biggest challenge was to build the gui in second sample (tilt shift 2)

Download code and exe (927kB)

Another thumbnail demo

AlphaThumbs
This is yet another demo of thumbnails using my component, rkView. You will also need rkVistaPanel to run this demo. The main point of this demo is to show how you can work with thumbnails and alpha blending. I did try to keep the source short but alpha blending is a little complicated. Anyway here I show you one way of doing it. I also added check marks to the thumbs. Hope you find it useful.

Download Demo(Source and Exe)

Regards
Roy M Klever

VistaProBar updated to version 1.7

VistaProBar in use

New VistaProBar "style"

This is a small update were I only have added three properties: BackColor, BorderColor, CornerColor.

I think this makes it a little more useful. I needed the properties to get my music progress bar.I think it looks good.

Have fun.

Download rkVistaProBar from download page. Collection not updated yet.

A smart dialog solution

An image of a filter dialog

Sample filter dialog

When doing graphics filters I am often annoyed by the fixed dialog most people use, so I decided to try to come up with an alternative solution and this is what I did.

To compile the demo you need to install the included component, rkFilterPreviewDialog.

This component will display a dialog according to the instructions in the controls property. You can add a label, trackbar, radiobutton or a space command.
Commands you can use are:
L:Just a label
R:Radio button:0 // change zero to one to select it
S:16 // a 16 pixels space is added before next component is added
T:0:100:10:10 // Trackbar:Min:Max:Value:Frequency

You can use the properties CtrlBegin and CtrlEnd to say where the dialog starts and end. From line to line. See demo to get a better view.
Remember to set UseBeginEnd when using these properties.

Here is the setup for the dialog in the picture above.
— Misc
R:Mosaic:1
T:0:100:10:10
S:16
R:Split light:0
T:0:10:1:1
S:16
R:Split blur:0
T:0:100:10:10
S:16
R:Spray:0
T:0:50:10:5
S:16
R:Roll Horizontal/Vertical:0
T:0:100:10:10
T:0:100:10:10

The demo shows how everything works a lot better than I can explain.

Download Component, demo and exe (505kB)

rkSmartTabs now smarter

The new SmartTabs component

rkSmartTabs in use

Version 1.8 of rkSmartTabs is up. A lot of new stuff in here.

A few things that are new.

Tab captions are now rendered a little different and close button are adjusted down a little.

You can now pin a tab to the left side. See image above, three pinned tabs to the left.

Use UnpinTab(ATab) to unpin a tab and PinTab(ATab) to pin a tab. A pinned tab can only show a glyph. You can use TabPinned(ATab) to check if a tab is pinned. Because of the way pinned tabs are handled you should use SetTabName and GetTabName to set and get the caption of a tab. To get which tab is under the cursor you can use the GetTabAtXY function.

There is a new property, OnCustomDraw, that will lett you draw onto a tab. This can be used to paint a progress indicator or other thing you would like to put on a tab.

Some new properties
Now you can control the colors of your tabs
The border colors
ColorBrdActive
ColorBrdHot
ColorBrdInActive

Text outline colors
ColorOutActive
ColorOutHot
ColorOutInActive

Color of the tabs
ColorTabActive
ColorTabHot
ColorTabInActive

Tabs caption text
ColorTxtActive
ColorTxtHot
ColorTxtInActive

GdiPlusText, this property is used when painting tabs in aero glass. I could not make gdi text work properly with aero so you need to enable gdi+ text rendering when using aero. If not using too transparent tabs aero works ok.

You can set the opacity of a tab state using the following properties
LevelTabActive
LevelTabHot
LevelTabInActive

Outline Text can be outlined by setting this property to true. This is not operativ when using gdi+ text

PinnedStr New in this version is pinned tabs set the symbol string you want to use for marking a pinned tab here

SeeThruTabs This property will let the other tabs shine thru, see what it looks like in picture above

Download at downloads page

This component uses the GDI + headers found at progdigy.com
In Delphi XE this is not working very well… one solution might be to rename the gdi+ units. I am trying to resolve this issue but as long I can not test, it is a little difficult. Maybe use graphics32 as the base is better?

Regards
Roy M Klever

SmartView sample application

This is the source code of the teaser program. Take note that this is just a sample and not, in any way, a complete application.

It uses a lot of my components so I suggest you download and install all of them.

Original a D2007 project but now a D2010 project. This means that the saving and loading of the albums are in ansi code and not unicode. When compiling in D2010 you will get a lot of warnings. I needed it to be in ansi code to be compatible with my existing album files. It should not be to difficult to come up with a different way of loading and saving albums.

Hope this helps a little in working with rkSmartView.

Some keys…
Ctrl + arrow left and right to expand and close all groups.
Space = Preview
Alt + left mousebutton will show image information.
F8 will show statistic information.
Press and hold left mousebutton in imagepreview to zoom.

Download project code