Draw Polygons with Specific RGB Values

I need to draw ISO lines on a particular layer using very specific colors (with defined RGB values). The lines need to be just one pixel wide.

Following this advice:

If you need colors beyond 256, or don't want to create a custom palette, you can add any number of solid colors you like by adding a bitmap fill style consisting of a small block of solid color. Choose a fill style name which makes them easy to remember if you later want to select them using Select By Fill Style.

from http://www.profantasy.com/cchelp/understanding_colors_in_cc3.htm

I went ahead and created quite a few 16x16 pixel PNG's with the required color. That is very convenient, because I can name the PNG files to correspond to the altitude they represent.

Now for the problem.

It doesn't seem possible to draw a thin line with the color represented by my PNG's (fill styles).

Apparently colors, not fill styles, can be applied to true lines.

If I draw a filled polygon and set the Line Width to something > 0 (say 0.1000), my fill style is applied to the line defining a filled polygon's border (almost what I need in fact), but unfortunately the line drawn is less and less solid as I zoom out (that is, the background color is drawn instead of the shape border more and more often as I zoom out).

Is there a way to draw a thin (ideally 1 pixel wide) line using a fill style that will export to BMP without leaving "gaps" at any zoom level? (If it disappears entirely due to being "too small" for the current zoom, that would be fine).

I have more than 31 colors to represent, so editing the palette to use the recommended range 176 to 207 is not an outstanding choice.

Comments

  • Here's an example of what I mean by "gaps"
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Since CC3 doesn't use pixels in the drawings, getting a line that is exactly one pixel wide is going to be challenging.

    Only way I can think of to draw thin lines like this without such gaps when you zoom is to set the pen thickness of the line. Unfortunately, this draws using the outline color for the entity, completely ignoring the bitmap fill style. Do you really need more than 256 colors though? Remember you can edit the palette color entries to any RGB value you need.

    I don't know if using the pen thickness is a good idea for you anyway though, because a line using a pen thickness appears the exact same size no matter how much you zoom in and out, which means that it's apparent thickness will change in relation to other entities as you zoom. If you wish to experiment with this, set the line width of the polygon to 0, fill style to hollow, then apply a pen width (Right click the change properties button to find the pen thickness command)
  • I have more than 31 colors. According to the documentation only colors 176 to 207 are "safe" to change, as the others may be used by stock symbols, etc.

    The approach you suggest (line width 0, fill style hollow, apply pen width) creates the 1px line that I need. However, it will only do that using the selected color from the color palette. I guess that would work if nothing else does, but I would certainly have to overwrite some colors that Profantasy says not to.
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    In most cases you'll be fine. Are you going to use vector symbols at all in the map? If not, it doesn't matter at all which colors you change, since just as with the raster fill style you tried to use, raster symbols are not affected by the palette.

    If you change the palette, remember to attach it to the current map (File --> Drawing properties)
Sign In or Register to comment.