Author Topic: Vector hatch pattern with opaque background  (Read 3968 times)

0 Members and 1 Guest are viewing this topic.

David.P

  • Jr. Member
  • **
  • Posts: 51
Vector hatch pattern with opaque background
« on: November 19, 2009, 05:40:55 AM »
Hi Chris & forum,

for a long time I've been looking for a way to create a hatch pattern that is line based (other than the bitmap based hatchings included with Visio). Additionally, and that is the problem, the area between the hatch lines should be opaque.

It sort of works if I create a custom fill pattern like the following:



...where I placed a white rectangle behind the hatch line, the rectangle as well as the line being slightly larger than the drawing area in order for the fill pattern to tile seamlessly. (In the above picture, the white background rectangle has been assigned some transparency only in order to be able to see the size of the drawing area).

This pattern looks and works great in Visio, however if it is printed to PDF, the lines are not smooth and straight anymore, see below (enlarged) PDF screenshot:



The hatch lines are perfectly straight for a fill pattern with no background (top half of the screenshot), but there is problems with the lines inside the fill pattern with background (lower half of the screenshot). This seems due to the fact that the fill pattern with no background is rendered by Visio in one single vector piece when printing to PDF -- whereas the fill pattern with background is rendered in lots of little tiles that somehow don't align correctly inside the PDF.

Thus the question would be, what could I do to improve the rendering of the fill pattern with the white background? Maybe there is another way to assign an opaque background to a fill pattern, other than using a separate white background shape for that purpose?

Thanks HEAPS already for any brainwave anyone might have regarding this dogged little issue,

Cheers David.P

PS: Visio version is 2003
« Last Edit: November 19, 2009, 11:38:14 PM by wapperdude »

Get Visio Guy's new book!


wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1386
  • Ideas Visio-lized into solutions
Re: Vector hatch pattern with opaque background
« Reply #1 on: November 19, 2009, 11:11:31 PM »
Hi David --

I tried this using V2007, and the Publish as PDF option.  I didn't see the line issue that you are referring to.  I tried various widths for the diagonal line, from as wide as 10pt to this fine line in the attached documents.  The blue dashed lines are not part of the pattern, but reference lines.  With the fine line pattern, there looks to be some sort of artifact that repeats itself.  This is different than what you observed, and, if you zoom in, it disappears.  Could be a slight resolution / misalignment problem.  The "page size" for my pattern is 0.5 in square, and this anomaly does seem to repeat every 1/2 inch.  It's much less noticeable as the line width increases.  Final observation, if you change the fill pattern such that the line ends at the corners of the yellow square, and then set the line ends to "extended", this anomaly goes away or is very, very slight.  Plus, fat lines still look continuous.

I will try to repeat this on V2003 tomorrow.

Wapperdude
« Last Edit: November 19, 2009, 11:37:50 PM by wapperdude »

Visit the Visio Guy web site at www.visguy.com for hundreds more articles on Visio!


David.P

  • Jr. Member
  • **
  • Posts: 51
Re: Vector hatch pattern with opaque background
« Reply #2 on: November 20, 2009, 04:22:51 AM »
Hi Wapper and thank you for your experiment & files.

Your example looks and behaves exactly the same in my copy of Visio 2003, also when printed to PDF with Adobe Acrobat Distiller 7.

This however seems due to the fact that my hatch pattern is rather fine (sorry for not having mentioned that initially).

Actually, the tile (=page) size of my hatch is 1.4 mm by 1.4 mm. It seems that only with such small hatches, the problem prevails (although the same size hatch with NO background color of course is still perfect, see my initial PDF screenshot).

Isn't it kind of strange that it seems there is no "proper" way in Visio to create a simple vector fill pattern with a background color -- given all the sophisticated ways in which to create those intelligent shapes...  :(

Thanks David

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1386
  • Ideas Visio-lized into solutions
Re: Vector hatch pattern with opaque background
« Reply #3 on: November 20, 2009, 10:06:08 AM »
Whoa!  That is mighty fine!  (Pun intended!   :o ).

Strange?  Perhaps, along with disappointing.  The custom fill and line pattern functionality has been one of those features that has been great to have but has some quirks.  Doing a custom line pattern on a "closed" shape is one of those issues.  Maintaining a fill pattern when drawing is exported --- well that's tough to anticipate all the needs when you consider all of the possible formats that a translator must handle.  When it comes to fill patterns, Visio and PDF have never quite seen "eye to eye"!  Depending upon whom you use to do the Adobe translation, V2003, and there are a lot of free ones out there, results do vary.

Wapperdude



David.P

  • Jr. Member
  • **
  • Posts: 51
Re: Vector hatch pattern with opaque background
« Reply #4 on: November 30, 2009, 06:55:29 AM »
Thanks Wapperdude for your reply. Seems as if we'd have to live with this limitation for the moment.

Cheers David.P