getBorderWidth() public method

public getBorderWidth ( ) : float
return float
示例#1
0
		// TODO: this function shouldn't be needed
		//
        private void pCopyAspectToPaint(cReportAspect fromAspect, cReportAspect toAspect) { 
            toAspect.setAlign(fromAspect.getAlign());
            toAspect.setBackColor(fromAspect.getBackColor());
            toAspect.setBorderColor(fromAspect.getBorderColor());
            toAspect.setBorderColor3d(fromAspect.getBorderColor3d());
            toAspect.setBorderColor3dShadow(fromAspect.getBorderColor3dShadow());
            toAspect.setBorderType(fromAspect.getBorderType());
            toAspect.setBorderWidth(fromAspect.getBorderWidth());
            toAspect.setCanGrow(fromAspect.getCanGrow());
            toAspect.setFormat(fromAspect.getFormat());
            toAspect.setHeight(fromAspect.getHeight());
            toAspect.setIsAccounting(fromAspect.getIsAccounting());
            toAspect.setLeft(fromAspect.getLeft());
            toAspect.setNZOrder(fromAspect.getNZOrder());
            toAspect.setSelectColor(fromAspect.getSelectColor());
            toAspect.setSymbol(fromAspect.getSymbol());
            toAspect.setTop(fromAspect.getTop());
            toAspect.setTransparent(fromAspect.getTransparent());
            toAspect.setWidth(fromAspect.getWidth());
            toAspect.setWordWrap(fromAspect.getWordWrap());

            pCopyFontPaint(fromAspect.getFont(), toAspect.getFont());
        }
        private void pDrawObjBox(
            Graphics graph, 
            cReportAspect aspect, 
            float x1,
            float y1,
            float x2,
            float y2, 
            bool filled, 
            int colorIn, 
            int colorOut)
        {

            // m_notBorder is used by preview and printing to indicate the controls must be print a border only
            // when BorderType != NONE
            // 
            if ((m_notBorder == false || filled) || (aspect.getBorderType() != csReportBorderType.CSRPTBSNONE))
            {
                if (aspect.getBorderType() == csReportBorderType.CSRPTBS3D)
                {

                    printLine(graph, filled, x1, y1, x2, y2, colorIn, 0, false, (int)csColors.C_COLOR_WHITE, false);

                    // top
                    //
                    printLine(graph, false, x1, y1, x2, y1, (int)csColors.C_COLOR_WHITE, 1, false, aspect.getBorderColor3d(), false);
                    // down
                    //
                    printLine(graph, false, x1, y2 - 1, x2, y2 - 1, (int)csColors.C_COLOR_WHITE, 1, false, aspect.getBorderColor3dShadow(), false);
                    // left
                    //
                    printLine(graph, false, x1 + 1, y1, x1 + 1, y2, (int)csColors.C_COLOR_WHITE, 1, false, aspect.getBorderColor3d(), false);
                    // right
                    //
                    printLine(graph, false, x2 - 1, y1, x2 - 1, y2, (int)csColors.C_COLOR_WHITE, 1, false, aspect.getBorderColor3dShadow(), false);
                }
                else if (aspect.getBorderRounded())
                {
                    printLine(graph, filled, x1, y1, x2, y2, colorIn, (int)aspect.getBorderWidth(), false, colorOut, true);
                }
                else
                {
                    //
                    // we are in the editor window
                    //
                    // TODO: this is a bug. Then only way to get a border is setting BorderType to CSRPTBS3D or 
                    //       BorderRounded == TRUE
                    //
                    //       when BorderType == CSRPTBSFIXED the border is not drawn
                    //
                    //       we need to fix it but the fix will break all reports so first we need to update
                    //       those reports to set the BorderType to CSRPTBSNONE
                    //
                    bool dash = false;
                    const int borderWidth = 1;

                    if (m_notBorder == false 
                            && (
                                (
                                    aspect.getBorderType() == csReportBorderType.CSRPTBSFIXED 
                                    && !aspect.getBorderRounded()
                                    && aspect.getBorderWidth() == 0
                                )
                                || aspect.getBorderType() == csReportBorderType.CSRPTBSNONE
                            )
                        )
                    {
                        colorOut = Color.Gray.ToArgb(); // 0xff9966; //Color.LightGray.ToArgb();
                        dash = true;
                    }

                    // TODO: clean this. we have many issues with this code. the value 16777215 is white
                    //       it is used in cairo reports. when a control has a background (colorIn) == white
                    //       we must not call printLine
                    //
                    if (!m_notBorder 
                        || (filled && colorIn != 16777215) // this is the value of white controls in cairo reports.
                        || (aspect.getBorderType() == csReportBorderType.CSRPTBSFIXED && aspect.getBorderWidth() > 0))
                    {
                        printLine(graph, filled, x1, y1, x2, y2, colorIn, borderWidth, dash, colorOut, false);
                    }
                }
            }
        }