Diagram frame background color in Enterprise Architect (15.2) - enterprise-architect

When creating some diagram in Enterprise Architect, it is an easy task to modify all blocks within the diagram, even the background color of the page itself. But I completely fail in finding the setting to change the background color of the actual frame itself. Is it really that hidden?
Sidemark: when changing theme also this color changes, so there must be something...
UPDATE: when selecting the diagram, I would expect the background color to be modified when using the toolbox, I can change frame color, text color, line width, but not bg color. Probably a bug...

I was deceived and thought this were boundaries. But they are diagram frames. And these do not have coloring. I thought about applying a different Theme to the underying diagram, but that is not inherited by the frame. I tried using a colored boundary as background but that will not fill the whole frame:
So basically: you're out of luck here. You might send a feature request. But you need a veeeery long breath.

Related

Color Document Sections in iText Sharp

Help, I need to create a PDF with iTextSharp that has
1) A green background for the entire document
2) Text (headings, tables, paragraphs) appear on a white background.
3) Special sections appear with a pink (or other color)
4) Headings on a Blue Background with White Text.
I can build a simple document, but the background colors are really throwing me off.
I add content using paragraphs, but I'm not sure how to set the background color of the paragraph, or group them together.
You create the document using objects such as Paragraphs, PdfPTables, and so on. You draw the rectangles using PdfContentByte methods. You obtain a PdfContentByte instance from a PdfWriter like this:
writer.getDirectContentUnder(); // Java
or
writer.DirectContentUnder; // C#
By using getDirectContentUnder() instead of getDirectContent(), the rectangles are drawn under the Paragraphs, PdfPTables, and so on.
Your main problem is keeping track of the coordinates: you need to know the coordinate of the lower-left corner and of the upper-right corner.
Drawing the background for a full page is a no-brainer. I've answered this question yesterday: How to draw border for whole pdf pages using iText library 5.5.2
Granted, in that answer I defined a border color for the rectangle because the OP only needed a red border on each page. You need to define the fill color of the rectangle instead of the border.
By examining the answer to yesterday's question, you'll discover the concept of page events. You'll also discover other page event methods, such as onParagraph() and onParagraphEnd(). These methods receive the Y coordinate of the start of each paragraph and the end of each paragraph. You can use these coordinates to draw rectangles in the page event.
To solve your problem, you would add a BaseColor member variable, a variable that keeps track of the initial Y value, and so on. It will require some programming, but with all the mechanisms explained in my answer, you should be able to meet your requirement.
Here's how I got it done:
Set the background color in the document
Created 1 column full page width table and set the white background
for each cell.
Add all my content to a cell
Add a new cell for each section
Draw a green border between cells, the same color as the background.
Placing content in the cells solves the problem of keeping track of the coordinates. Since the content could contain multiple paragraphs, sub-tables etc. I'm not sure if the onParagraphEnd would always fire.
Putting the content in the cells also allows control over color.

Changing the particular color in an image

By using the following image i want to write code.
here is the image i want to do this one programmatically.
User can select roof or wall or fencing or windows. After selecting the particular part and color(another model) then the present color(another model) should replace with selected color.
In this image(example) user selected color(yellow) for wall and brown color for roof, after selection of color and part, old color should replace with new one.
How can we achieve this
any suggestions or help
Check my answer of how you can change the specific colors of UIImage.
Two notes:
the question is about gray to white color change, you can use this technique to change any color to any other,
the code is taken from somewhere of the developers reference, so that colors in the snippet are kinda random.

How to know the background color of Pdf

Sometimes pdf might have a transparent background. And In my application I have given a option to choose background. So, in case of pdf with transparent background and background color black all things becomes black black so, any way to check or any key inside dictionary of pdf page that can help me? Any help will appreciated.
The easiest solution for you would be to remove black color from available background colors.
Generally, all pdf pages have transparent background and the white background color is set by the viewer application. It is possible to set a background color for each page. You can read all about it in Page Group under Transparency section of the PDF Reference.
It is also possible to show a background color for a page by setting 'BoxColorInfo' dictionary in the page dictionary with appropriate values.
But I am not sure what you can achieve by knowing what color a page background is, since black background is going to be a problem for PDFs with transparent pages anyways.
EDIT: Following is the paragraph from PDFReference i was trying to point you to:
Ordinarily, the page is imposed directly on an output medium, such as
paper or a display screen. The page group is treated as an isolated
group, whose results are then composited with a backdrop color
appropriate for the medium. The backdrop is nominally white, although
varying according to the actual properties of the medium. However,
some applications may choose to provide a different backdrop, such as
a checkerboard or grid to aid in visualizing the effects of
transparency in the artwork.
It says that most PDFs would have a transparent and it is your application which shows the background color. Hope this helps.

how to draw a popover view instead of using image on iPhone?

just like the popover in the attached screenshots, the popover allow user to change themes.
I know that there are some examples around but they are all using images to achieve this, make it hard to change themes.
I believe the app in the screenshots doesn't using images to do it.
thanks for any help!
In my Win background such skins (called "Flat" in Delphi and WinForms) were made by drawing in code: select a color, draw a line, select another color, draw a rounded rectangle and so on.
Also, it is necessary to introduce a class "ColorTheme" with a set of fields for every color used. You may have several ColorTheme instances and swap them when you need to change color theme.

Color overlaying algorithm

I'm looking for an algorithm to overlay a color on top of existing picture. Something similar to the following app (wall painter): http://itunes.apple.com/us/app/wall-painter/id396799182?mt=8
I want a similar functionality so I can paint walls in an existing picture and change them to a different color.
I can work both in yuv or rgb mode.
To successfully paint the walls in a picture, you have to do two steps:
Find the boundary of the wall within the picture (select the part of the image to be colored)
Apply the desired color to the selected area
The first step is the hard part. It similar to what Photoshop's magic wand tool would do. And indeed a search for magic wand algorithm turns up a few good articles such as this article with Objective-C code.
The second step is much easier and can be achieve with CGContextSetBlendMode and CGContextDrawImage.
You could try drawing into a graphics context with kCGBlendModeColor. From the documentation:
Uses the luminance values of the background with the hue and saturation values of the source image. This mode preserves the gray levels in the image. You can use this mode to color monochrome images or to tint color images.
Experimenting with other blend modes might also do the trick. See the documentation for details (search for "kCGBlendMode").
The RGB and YUV color models are not really great for changing colors in this way. I think the best color model for this is HLS.
Link: RGB to HLS and HLS to RGB conversion source code
H (hue) will change the base color
L (luminance) will change the brightness
S (saturation) will change the amount of color
You can evaluate the effect of these three components in a photo editing app, like Photoshop of The GIMP.