Examples of Spacing


Examples of org.docx4j.wml.PPrBase.Spacing

    }
   
    // If the docDefaults have no setting for w:spacing
    // then add it:
    if (documentDefaultPPr.getSpacing()==null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      documentDefaultPPr.setSpacing(spacing);
      spacing.setBefore(BigInteger.ZERO);
      spacing.setAfter(BigInteger.ZERO);
      spacing.setLine(BigInteger.valueOf(240));
    }

    // Setup documentDefaultRPr
    RPr documentDefaultRPr;
    if (docDefaults.getRPrDefault() == null) {
View Full Code Here

Examples of org.docx4j.wml.PPrBase.Spacing

  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }   
    pPr.getSpacing().setBefore((BigInteger)this.getObject() );
  }
View Full Code Here

Examples of org.docx4j.wml.PPrBase.Spacing

  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }
    pPr.getSpacing().setAfter((BigInteger)this.getObject() );
  }
View Full Code Here

Examples of org.docx4j.wml.PPrBase.Spacing

  }

  @Override
  public void set(PPr pPr) {
    if (pPr.getSpacing()==  null) {
      Spacing spacing = Context.getWmlObjectFactory().createPPrBaseSpacing();
      pPr.setSpacing(spacing);
    }
    pPr.getSpacing().setLine((BigInteger)this.getObject() );
  }
View Full Code Here

Examples of org.docx4j.wml.PPrBase.Spacing

    if (pPr.getShd() != null)
      properties.add(new PShading(pPr.getShd()));
//    if (pPr.getSnapToGrid() != null)
//      dest.setSnapToGrid(pPr.getSnapToGrid());
    if (pPr.getSpacing() != null) {
      Spacing spacing = pPr.getSpacing();
      if (spacing.getBefore()!=null) {
        properties.add(new SpaceBefore(spacing.getBefore()));
      }
      if (spacing.getAfter()!=null) {
        properties.add(new SpaceAfter(spacing.getAfter()));       
      }
      if (spacing.getLine()!=null) {
        properties.add(new LineSpacing(spacing.getLine()));               
      }
      // Others not implemented:
      // "beforeLines"
      // beforeAutospacing"
      // afterLines"
View Full Code Here

Examples of org.jfree.fonts.text.Spacing

    }

    int glyphClassification = classificationProducer.getClassification(codePoint);
    final long kerning = kerningProducer.getKerning(codePoint);
    int breakweight = breakOpportunityProducer.createBreakOpportunity(codePoint);
    final Spacing spacing = spacingProducer.createSpacing(codePoint);
    dims = fontSizeProducer.getCharacterSize(codePoint, dims);
    int width = (dims.getWidth() & 0x7FFFFFFF);
    int height = (dims.getHeight() & 0x7FFFFFFF);
    lastLanguage = languageClassifier.getScript(codePoint);
View Full Code Here

Examples of org.jfree.fonts.text.Spacing

        (minValue, layoutContext, outputMetaData);
    final int optIntVal = (int) CSSValueResolverUtility.convertLengthToDouble
        (optValue, layoutContext, outputMetaData);
    final int maxIntVal = (int) CSSValueResolverUtility.convertLengthToDouble
        (maxValue, layoutContext, outputMetaData);
    final Spacing spacing = new Spacing(minIntVal, optIntVal, maxIntVal);
//    Log.debug("Using some static spacing: " + spacing);
    return new StaticSpacingProducer(spacing);
  }
View Full Code Here

Examples of org.jfree.fonts.text.Spacing

    final int lastPos = Math.min(glyphs.length, offset + length);
    for (int i = offset; i < lastPos; i++)
    {
      final Glyph glyph = glyphs[i];
      final Spacing spacing = glyph.getSpacing();
    //      heightAbove = Math.max(glyph.getBaseLine(), heightAbove);
    //      heightBelow = Math.max(glyph.getHeight() - glyph.getBaseLine(), heightBelow);
      final int kerning = glyph.getKerning();
      final int width = glyph.getWidth();
      if (glyph.getBreakWeight() <= BreakOpportunityProducer.BREAK_CHAR)
      {
        // for the layouting, we avoid inner-word breaks
        // Later, when we have to force breaks, we may take inner-breaks into
        // account.
        wordMinChunkWidth += width + spacing.getMinimum() - kerning;
        wordMinWidth += width + spacing.getMinimum() - kerning;
        wordPrefWidth += width + spacing.getOptimum() - kerning;
        wordMaxWidth += width + spacing.getMaximum() - kerning;
      }
      else
      {
        wordMinChunkWidth += width + spacing.getMinimum() - kerning;
        wordMinWidth += width + spacing.getMinimum() - kerning;
        wordPrefWidth += width + spacing.getOptimum() - kerning;
        wordMaxWidth += width + spacing.getMaximum() - kerning;

        minimumChunkWidth = Math.max(minimumChunkWidth, wordMinChunkWidth);
        wordMinWidth = 0;

        // Paranoid sanity checks: The word- and linebreaks should have been
View Full Code Here

Examples of org.jfree.fonts.text.Spacing

    final int lastPos = Math.min(glyphs.length, offset + length);
    for (int i = offset; i < lastPos; i++)
    {
      final Glyph glyph = glyphs[i];
      final Spacing spacing = glyph.getSpacing();
    //      heightAbove = Math.max(glyph.getBaseLine(), heightAbove);
    //      heightBelow = Math.max(glyph.getHeight() - glyph.getBaseLine(), heightBelow);
      final int kerning = glyph.getKerning();
      final int width = glyph.getWidth();
      if (glyph.getBreakWeight() <= BreakOpportunityProducer.BREAK_CHAR)
      {
        // for the layouting, we avoid inner-word breaks
        // Later, when we have to force breaks, we may take inner-breaks into
        // account.
        wordMinChunkWidth += width + spacing.getMinimum() - kerning;
        wordMinWidth += width + spacing.getMinimum() - kerning;
        wordPrefWidth += width + spacing.getOptimum() - kerning;
        wordMaxWidth += width + spacing.getMaximum() - kerning;
      }
      else
      {
        wordMinChunkWidth += width + spacing.getMinimum() - kerning;
        wordMinWidth += width + spacing.getMinimum() - kerning;
        wordPrefWidth += width + spacing.getOptimum() - kerning;
        wordMaxWidth += width + spacing.getMaximum() - kerning;

        minimumChunkWidth = Math.max(minimumChunkWidth, wordMinChunkWidth);
        wordMinWidth = 0;

        // Paranoid sanity checks: The word- and linebreaks should have been
View Full Code Here

Examples of org.jfree.fonts.text.Spacing

    long kerning = kerningProducer.getKerning(codePoint);

    int breakweight = breakOpportunityProducer.createBreakOpportunity(codePoint);

    Spacing spacing = spacingProducer.createSpacing(codePoint);

    dims = fontSizeProducer.getCharacterSize(codePoint, dims);

    int width = (dims.getWidth() & 0x7FFFFFFF);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.